GNU libmicrohttpd 1.0.0
|
#include "mhd_mono_clock.h"
Go to the source code of this file.
Macros | |
#define | NULL ((void*)0) |
Enumerations | |
enum | _MHD_mono_clock_source { _MHD_CLOCK_NO_SOURCE = 0 , _MHD_CLOCK_GETTIME , _MHD_CLOCK_GET_TIME , _MHD_CLOCK_GETHRTIME , _MHD_CLOCK_GETTICKCOUNT64 , _MHD_CLOCK_PERFCOUNTER } |
Functions | |
void | MHD_monotonic_sec_counter_init (void) |
void | MHD_monotonic_sec_counter_finish (void) |
time_t | MHD_monotonic_sec_counter (void) |
uint64_t | MHD_monotonic_msec_counter (void) |
Variables | |
static time_t | sys_clock_start |
Definition at line 66 of file mhd_mono_clock.c.
Type of monotonic clock source
Enumerator | |
---|---|
_MHD_CLOCK_NO_SOURCE | No monotonic clock |
_MHD_CLOCK_GETTIME | clock_gettime() with specific clock |
_MHD_CLOCK_GET_TIME | clock_get_time() with specific clock service |
_MHD_CLOCK_GETHRTIME | gethrtime() / 1000000000 |
_MHD_CLOCK_GETTICKCOUNT64 | GetTickCount64() / 1000 |
_MHD_CLOCK_PERFCOUNTER |
Definition at line 105 of file mhd_mono_clock.c.
Monotonic milliseconds counter, useful for timeout calculation. Tries to be not affected by manually setting the system real time clock or adjustments by NTP synchronization.
Definition at line 440 of file mhd_mono_clock.c.
References MHD_HTTP_OK, NULL, and sys_clock_start.
Referenced by calculate_add_nonce_with_retry(), connection_check_timedout(), digest_auth_check_all_inner(), MHD_set_connection_option(), MHD_update_last_activity_(), new_connection_prepare_(), and resume_suspended_connections().
Monotonic seconds counter. Tries to be not affected by manually setting the system real time clock or adjustments by NTP synchronization.
Definition at line 388 of file mhd_mono_clock.c.
References MHD_HTTP_OK, NULL, and sys_clock_start.
Deinitialise monotonic seconds and milliseconds counters by freeing any allocated resources
Definition at line 367 of file mhd_mono_clock.c.
References MHD_HTTP_OK.
Initialise monotonic seconds and milliseconds counters.
Definition at line 143 of file mhd_mono_clock.c.
References _MHD_CLOCK_GET_TIME, _MHD_CLOCK_GETHRTIME, _MHD_CLOCK_GETTICKCOUNT64, _MHD_CLOCK_GETTIME, _MHD_CLOCK_NO_SOURCE, _MHD_CLOCK_PERFCOUNTER, MHD_HTTP_OK, NULL, and sys_clock_start.
|
static |
Definition at line 88 of file mhd_mono_clock.c.