1 /* $NetBSD: timer.h,v 1.1 2024/02/18 20:57:38 christos Exp $ */ 2 3 /* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * SPDX-License-Identifier: MPL-2.0 7 * 8 * This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 * 12 * See the COPYRIGHT file distributed with this work for additional 13 * information regarding copyright ownership. 14 */ 15 16 #ifndef DNS_TIMER_H 17 #define DNS_TIMER_H 1 18 19 /*! \file dns/timer.h */ 20 21 /*** 22 *** Imports 23 ***/ 24 25 #include <stdbool.h> 26 27 #include <isc/buffer.h> 28 #include <isc/lang.h> 29 30 ISC_LANG_BEGINDECLS 31 32 /*** 33 *** Functions 34 ***/ 35 36 isc_result_t 37 dns_timer_setidle(isc_timer_t *timer, unsigned int maxtime, 38 unsigned int idletime, bool purge); 39 /*%< 40 * Convenience function for setting up simple, one-second-granularity 41 * idle timers as used by zone transfers. 42 * \brief 43 * Set the timer 'timer' to go off after 'idletime' seconds of inactivity, 44 * or after 'maxtime' at the very latest. Events are purged iff 45 * 'purge' is true. 46 */ 47 48 ISC_LANG_ENDDECLS 49 50 #endif /* DNS_TIMER_H */ 51