litl  0.1.9
Functions | Variables
Pre-Defined Timing Methods

Functions

litl_time_t litl_get_time_monotonic_raw ()
 Uses clock_gettime(CLOCK_MONOTONIC_RAW) More...
 
litl_time_t litl_get_time_monotonic ()
 Uses clock_gettime(CLOCK_MONOTONIC) More...
 
litl_time_t litl_get_time_realtime ()
 Uses clock_gettime(CLOCK_REALTIME) More...
 
litl_time_t litl_get_time_process_cputime ()
 Uses clock_gettime(CLOCK_PROCESS_CPUTIME) More...
 
litl_time_t litl_get_time_thread_cputime ()
 Uses clock_gettime(CLOCK_THREAD_CPUTIME) More...
 
litl_time_t litl_get_time_ticks ()
 Uses CPU-specific register (for instance, rdtsc for X86* processors) More...
 
litl_time_t litl_get_time_none ()
 Ultra-fast measurement function. More...
 

Variables

litl_timing_method_t litl_get_time
 Calls the selected timing method and get the current time in ns. More...
 

Detailed Description

Function Documentation

◆ litl_get_time_monotonic()

litl_time_t litl_get_time_monotonic ( )

Uses clock_gettime(CLOCK_MONOTONIC)

Returns
Returns the monotonic time since some unspecified starting point

Definition at line 236 of file litl_timer.c.

◆ litl_get_time_monotonic_raw()

litl_time_t litl_get_time_monotonic_raw ( )

Uses clock_gettime(CLOCK_MONOTONIC_RAW)

Returns
Returns time that is similar to CLOCK_MONOTONIC, but provides access to a raw hardware-based time

Definition at line 223 of file litl_timer.c.

◆ litl_get_time_none()

litl_time_t litl_get_time_none ( )

Ultra-fast measurement function.

Returns
Always returns 0

Definition at line 285 of file litl_timer.c.

◆ litl_get_time_process_cputime()

litl_time_t litl_get_time_process_cputime ( )

Uses clock_gettime(CLOCK_PROCESS_CPUTIME)

Returns
Returns the high-resolution per-process time from the CPU

Definition at line 262 of file litl_timer.c.

◆ litl_get_time_realtime()

litl_time_t litl_get_time_realtime ( )

Uses clock_gettime(CLOCK_REALTIME)

Returns
Returns the real (wall-clock) time

Definition at line 249 of file litl_timer.c.

◆ litl_get_time_thread_cputime()

litl_time_t litl_get_time_thread_cputime ( )

Uses clock_gettime(CLOCK_THREAD_CPUTIME)

Returns
Returns the thread-specific CPU-time

Definition at line 275 of file litl_timer.c.

◆ litl_get_time_ticks()

litl_time_t litl_get_time_ticks ( )

Uses CPU-specific register (for instance, rdtsc for X86* processors)

Returns
Returns the measured time in clock cycles

Definition at line 295 of file litl_timer.c.

Variable Documentation

◆ litl_get_time

litl_timing_method_t litl_get_time
extern

Calls the selected timing method and get the current time in ns.

Definition at line 37 of file litl_timer.c.