#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
Go to the source code of this file.
Typedefs | |
typedef struct timeutil_rest | timeutil_rest_t |
Functions | |
int64_t | time_util_hhmmss_ss_to_utime (double time) |
int64_t | timeutil_ms_to_us (int32_t ms) |
timeutil_rest_t * | timeutil_rest_create () |
void | timeutil_rest_destroy (timeutil_rest_t *rest) |
uint32_t | timeutil_sleep (unsigned int seconds) |
int32_t | timeutil_sleep_hz (timeutil_rest_t *rest, double hz) |
void | timeutil_timer_reset (timeutil_rest_t *rest) |
void | timeutil_timer_start (timeutil_rest_t *rest) |
void | timeutil_timer_stop (timeutil_rest_t *rest) |
bool | timeutil_timer_timeout (timeutil_rest_t *rest, double timeout_s) |
int32_t | timeutil_usleep (int64_t useconds) |
int64_t | utime_get_seconds (int64_t v) |
int64_t | utime_get_useconds (int64_t v) |
int64_t | utime_now () |
void | utime_to_timespec (int64_t v, struct timespec *ts) |
void | utime_to_timeval (int64_t v, struct timeval *tv) |
typedef struct timeutil_rest timeutil_rest_t |
Definition at line 58 of file time_util.h.
int64_t time_util_hhmmss_ss_to_utime | ( | double | time | ) |
Definition at line 140 of file time_util.c.
int64_t timeutil_ms_to_us | ( | int32_t | ms | ) |
Definition at line 159 of file time_util.c.
timeutil_rest_t* timeutil_rest_create | ( | ) |
Definition at line 38 of file time_util.c.
void timeutil_rest_destroy | ( | timeutil_rest_t * | rest | ) |
Definition at line 44 of file time_util.c.
uint32_t timeutil_sleep | ( | unsigned int | seconds | ) |
Definition at line 90 of file time_util.c.
int32_t timeutil_sleep_hz | ( | timeutil_rest_t * | rest, |
double | hz | ||
) |
Definition at line 101 of file time_util.c.
void timeutil_timer_reset | ( | timeutil_rest_t * | rest | ) |
Definition at line 115 of file time_util.c.
void timeutil_timer_start | ( | timeutil_rest_t * | rest | ) |
Definition at line 121 of file time_util.c.
void timeutil_timer_stop | ( | timeutil_rest_t * | rest | ) |
Definition at line 126 of file time_util.c.
bool timeutil_timer_timeout | ( | timeutil_rest_t * | rest, |
double | timeout_s | ||
) |
Definition at line 134 of file time_util.c.
int32_t timeutil_usleep | ( | int64_t | useconds | ) |
Definition at line 78 of file time_util.c.
int64_t utime_get_seconds | ( | int64_t | v | ) |
Definition at line 56 of file time_util.c.
int64_t utime_get_useconds | ( | int64_t | v | ) |
Definition at line 61 of file time_util.c.
int64_t utime_now | ( | ) |
Definition at line 49 of file time_util.c.
void utime_to_timespec | ( | int64_t | v, |
struct timespec * | ts | ||
) |
Definition at line 72 of file time_util.c.
void utime_to_timeval | ( | int64_t | v, |
struct timeval * | tv | ||
) |
Definition at line 66 of file time_util.c.