OpenVPN
Functions | Variables
otime.c File Reference
#include "syshead.h"
#include "otime.h"
#include "memdbg.h"
Include dependency graph for otime.c:

Go to the source code of this file.

Functions

void update_now (const time_t system_time)
 
void update_now_usec (struct timeval *tv)
 
const char * tv_string (const struct timeval *tv, struct gc_arena *gc)
 
const char * tv_string_abs (const struct timeval *tv, struct gc_arena *gc)
 
const char * time_string (time_t t, int usec, bool show_usec, struct gc_arena *gc)
 
struct frequency_limitfrequency_limit_init (int max, int per)
 
void frequency_limit_free (struct frequency_limit *f)
 
bool frequency_limit_event_allowed (struct frequency_limit *f)
 

Variables

time_t now = 0
 
static time_t now_adj = 0
 
time_t now_usec = 0
 

Function Documentation

◆ frequency_limit_event_allowed()

bool frequency_limit_event_allowed ( struct frequency_limit f)

◆ frequency_limit_free()

void frequency_limit_free ( struct frequency_limit f)

Definition at line 164 of file otime.c.

References free.

Referenced by multi_uninit().

◆ frequency_limit_init()

struct frequency_limit* frequency_limit_init ( int  max,
int  per 
)

◆ time_string()

const char* time_string ( time_t  t,
int  usec,
bool  show_usec,
struct gc_arena gc 
)

◆ tv_string()

const char* tv_string ( const struct timeval *  tv,
struct gc_arena gc 
)

Definition at line 88 of file otime.c.

References alloc_buf_gc(), BSTR, and buf_printf().

Referenced by schedule_remove_entry().

◆ tv_string_abs()

const char* tv_string_abs ( const struct timeval *  tv,
struct gc_arena gc 
)

Definition at line 103 of file otime.c.

References time_string().

◆ update_now()

void update_now ( const time_t  system_time)

Definition at line 49 of file otime.c.

References now, and now_adj.

Referenced by update_now_usec().

◆ update_now_usec()

void update_now_usec ( struct timeval *  tv)

Definition at line 72 of file otime.c.

References now, now_usec, and update_now().

Variable Documentation

◆ now

time_t now = 0

Definition at line 36 of file otime.c.

Referenced by check_add_routes_dowork(), check_coarse_timers(), check_coarse_timers_dowork(), check_connection_established_dowork(), check_stale_routes(), check_timeout_random_component(), check_timeout_random_component_dowork(), check_timestamp_delta(), do_init_server_poll_timeout(), do_init_timers(), do_up(), event_timeout_remaining(), event_timeout_reset(), event_timeout_trigger(), fragment_incoming(), fragment_init(), fragment_ttl_reap(), frequency_limit_event_allowed(), ifconfig_pool_entry_free(), ifconfig_pool_set(), interval_action(), interval_future_trigger(), interval_schedule_wakeup(), interval_test(), key_state_soft_reset(), lame_duck_must_die(), man_block(), man_bytecount_output_client(), man_bytecount_possible_output_client(), management_bytes_in(), management_echo(), management_event_loop_n_seconds(), management_set_state(), multi_client_disconnect_setenv(), multi_create_instance(), multi_get_instance_by_virtual_addr(), multi_learn_addr(), multi_print_status(), multi_process_per_second_timers(), multi_reap_new(), multi_reap_process(), multi_reap_process_dowork(), multi_route_defined(), openvpn_time(), packet_id_add(), packet_id_persist_print(), packet_id_reap(), packet_id_reap_test(), packet_id_send_update(), process_explicit_exit_notification_init(), process_explicit_exit_notification_timer_wakeup(), process_incoming_push_request(), reliable_can_send(), reliable_mark_deleted(), reliable_schedule_now(), reliable_send(), reliable_send_purge(), reliable_send_timeout(), schedule_exit(), test_packet_id_write_long(), test_packet_id_write_long_prepend(), test_packet_id_write_long_wrap(), test_packet_id_write_short(), test_packet_id_write_short_prepend(), tls_authentication_status(), tls_crypt_v2_write_client_key_file(), tls_pre_encrypt(), tls_process(), tls_test_auth_deferred_interval(), update_now(), update_now_usec(), update_time(), verify_user_pass(), and virtual_output_callback_func().

◆ now_adj

time_t now_adj = 0
static

Definition at line 40 of file otime.c.

Referenced by update_now().

◆ now_usec

time_t now_usec = 0

Definition at line 41 of file otime.c.

Referenced by update_now_usec().