#include <arax.h>
#include <unistd.h>
Go to the source code of this file.
◆ utils_timer_get_duration_ns
#define utils_timer_get_duration_ns |
( |
| NAME | ) |
|
◆ utils_timer_get_duration_us
#define utils_timer_get_duration_us |
( |
| NAME | ) |
|
Value:Get the duration in microseconds of the NAME
timer.
- Parameters
-
NAME | Name of a utils_timer variable |
Definition at line 73 of file timer.h.
◆ utils_timer_get_elapsed_ns
#define utils_timer_get_elapsed_ns |
( |
| NAME | ) |
|
Value: ({ \
struct timespec now; \
clock_gettime(CLOCK_REALTIME, &now); \
})
#define utils_timer_get_time_ns(NAME, WHAT)
Get the current elapsed time since timer start time in nanoseconds.
- Parameters
-
NAME | Name of a utils_timer variable |
Definition at line 105 of file timer.h.
◆ utils_timer_get_elapsed_us
#define utils_timer_get_elapsed_us |
( |
| NAME | ) |
|
Value: ({ \
struct timespec now; \
clock_gettime(CLOCK_REALTIME, &now); \
})
#define utils_timer_get_time_us(NAME, WHAT)
Get the current elapsed time since timer start time in microseconds.
- Parameters
-
NAME | Name of a utils_timer variable |
Definition at line 92 of file timer.h.
◆ utils_timer_get_raw
#define utils_timer_get_raw |
( |
| NAME, |
|
|
| WHAT ) |
Value:Get the raw values of start/stop time of NAME
timer.
- Parameters
-
NAME | Name of a utils_timer variable |
WHAT | Can be start or stop |
Definition at line 21 of file timer.h.
◆ utils_timer_get_time_ns
#define utils_timer_get_time_ns |
( |
| NAME, |
|
|
| WHAT ) |
Value:Get the start/stop time in nanoseconds of the NAME
timer.
- Parameters
-
NAME | Name of a utils_timer variable |
WHAT | Can be start or stop |
- Returns
- The requested timestamp in nanoseconds
Definition at line 65 of file timer.h.
◆ utils_timer_get_time_us
#define utils_timer_get_time_us |
( |
| NAME, |
|
|
| WHAT ) |
Value:Get the start/stop time in microseconds of the NAME
timer.
- Parameters
-
NAME | Name of a utils_timer variable |
WHAT | Can be start or stop |
- Returns
- The requested timestamp in microseconds
Definition at line 55 of file timer.h.
◆ UTILS_TIMER_MS
#define UTILS_TIMER_MS 1000000 |
◆ UTILS_TIMER_NS
◆ utils_timer_set
#define utils_timer_set |
( |
| NAME, |
|
|
| WHAT ) |
◆ utils_timer_set_raw
#define utils_timer_set_raw |
( |
| NAME, |
|
|
| WHAT, |
|
|
| RAW ) |
Value:Set the start/stop time of NAME
timer for the raw values RAW.
- Parameters
-
NAME | Name of a utils_timer variable |
WHAT | Can be start or stop |
RAW | Raw value of timer as returned by utils_timer_get_raw |
Definition at line 30 of file timer.h.
◆ utils_timer_tv_time
#define utils_timer_tv_time |
( |
| TV, |
|
|
| SCALE ) |
Value: (((TV).tv_sec * (1000000000 / SCALE)) + (TV).tv_nsec / (SCALE))
Convert TV
struct to time in SCALE
units.
SCALE = 1000 => microseconds SCALE = 1 => nanoseconds
Definition at line 45 of file timer.h.
◆ UTILS_TIMER_US
#define UTILS_TIMER_US 1000 |