|
litl
0.1.9
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <time.h>#include "litl_timer.h"Go to the source code of this file.
Macros | |
| #define | ERROR_TIMER_NOT_AVAILABLE() |
| #define | TIMER_DEFAULT litl_get_time_monotonic |
| #define | RUN_BENCHMARK(_func_) |
| #define | ticks(val) |
Functions | |
| litl_time_t | litl_get_time_none () |
| Ultra-fast measurement function. More... | |
| void | litl_time_initialize () |
| Initializes the timing mechanism. More... | |
| int | litl_set_timing_method (litl_timing_method_t callback) |
| Selects the timing function to use. More... | |
| 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... | |
Variables | |
| litl_timing_method_t | litl_get_time = TIMER_DEFAULT |
| Calls the selected timing method and get the current time in ns. More... | |
| #define ERROR_TIMER_NOT_AVAILABLE | ( | ) |
Definition at line 19 of file litl_timer.c.
| #define RUN_BENCHMARK | ( | _func_ | ) |
| #define ticks | ( | val | ) |
| #define TIMER_DEFAULT litl_get_time_monotonic |
Definition at line 29 of file litl_timer.c.