Data Structures | Macros | Functions
interval.h File Reference
#include "otime.h"
Include dependency graph for interval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  interval
struct  event_timeout
struct  usec_timer


#define INTERVAL_DEBUG   0
#define ETT_DEFAULT   (-1)
#define USEC_TIMER_MAX   60 /* maximum interval size in seconds */
#define USEC_TIMER_MAX_USEC   (USEC_TIMER_MAX * 1000000)


void interval_init (struct interval *top, int horizon, int refresh)
static bool interval_test (struct interval *top)
static void interval_schedule_wakeup (struct interval *top, interval_t *wakeup)
static void interval_future_trigger (struct interval *top, interval_t wakeup)
static void interval_action (struct interval *top)
static bool event_timeout_defined (const struct event_timeout *et)
static void event_timeout_clear (struct event_timeout *et)
static struct event_timeout event_timeout_clear_ret (void)
static void event_timeout_init (struct event_timeout *et, interval_t n, const time_t local_now)
static void event_timeout_reset (struct event_timeout *et)
static void event_timeout_modify_wakeup (struct event_timeout *et, interval_t n)
static interval_t event_timeout_remaining (struct event_timeout *et)
bool event_timeout_trigger (struct event_timeout *et, struct timeval *tv, const int et_const_retry)
static void usec_timer_start (struct usec_timer *obj)
static void usec_timer_end (struct usec_timer *obj)
static bool usec_timer_interval_defined (struct usec_timer *obj)
static int usec_timer_interval (struct usec_timer *obj)

Macro Definition Documentation


#define ETT_DEFAULT   (-1)


#define INTERVAL_DEBUG   0

Definition at line 35 of file interval.h.


#define USEC_TIMER_MAX   60 /* maximum interval size in seconds */

Definition at line 223 of file interval.h.

Referenced by usec_timer_interval().


#define USEC_TIMER_MAX_USEC   (USEC_TIMER_MAX * 1000000)

Definition at line 225 of file interval.h.

Function Documentation

◆ event_timeout_clear()

static void event_timeout_clear ( struct event_timeout et)

◆ event_timeout_clear_ret()

static struct event_timeout event_timeout_clear_ret ( void  )

Definition at line 158 of file interval.h.

References event_timeout_clear().

◆ event_timeout_defined()

static bool event_timeout_defined ( const struct event_timeout et)

◆ event_timeout_init()

static void event_timeout_init ( struct event_timeout et,
interval_t  n,
const time_t  local_now 

◆ event_timeout_modify_wakeup()

static void event_timeout_modify_wakeup ( struct event_timeout et,
interval_t  n 

Definition at line 183 of file interval.h.

References event_timeout::defined, and event_timeout::n.

Referenced by check_push_request().

◆ event_timeout_remaining()

static interval_t event_timeout_remaining ( struct event_timeout et)

Definition at line 197 of file interval.h.

References event_timeout::last, event_timeout::n, and now.

Referenced by get_server_poll_remaining_time().

◆ event_timeout_reset()

static void event_timeout_reset ( struct event_timeout et)

◆ event_timeout_trigger()

bool event_timeout_trigger ( struct event_timeout et,
struct timeval *  tv,
const int  et_const_retry 

◆ interval_action()

static void interval_action ( struct interval top)

Definition at line 124 of file interval.h.

References D_INTERVAL, dmsg, interval::last_action, and now.

Referenced by check_tls(), process_incoming_link_part1(), and reschedule_multi_process().

◆ interval_future_trigger()

static void interval_future_trigger ( struct interval top,
interval_t  wakeup 

Definition at line 108 of file interval.h.

References D_INTERVAL, dmsg, interval::future_trigger, and now.

Referenced by check_tls().

◆ interval_init()

void interval_init ( struct interval top,
int  horizon,
int  refresh 

Definition at line 37 of file interval.c.

References CLEAR, interval::horizon, and interval::refresh.

Referenced by do_init_timers().

◆ interval_schedule_wakeup()

static void interval_schedule_wakeup ( struct interval top,
interval_t wakeup 

◆ interval_test()

static bool interval_test ( struct interval top)

◆ usec_timer_end()

static void usec_timer_end ( struct usec_timer obj)

Definition at line 242 of file interval.h.

References usec_timer::end, and openvpn_gettimeofday().

◆ usec_timer_interval()

static int usec_timer_interval ( struct usec_timer obj)

Definition at line 256 of file interval.h.

References usec_timer::end, usec_timer::start, tv_subtract(), and USEC_TIMER_MAX.

◆ usec_timer_interval_defined()

static bool usec_timer_interval_defined ( struct usec_timer obj)

Definition at line 250 of file interval.h.

References usec_timer::end, and usec_timer::start.

◆ usec_timer_start()

static void usec_timer_start ( struct usec_timer obj)

Definition at line 235 of file interval.h.

References CLEAR, openvpn_gettimeofday(), and usec_timer::start.