WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
time_util.h File Reference
#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

timeutil_rest_ttimeutil_rest_create (void)
 
void timeutil_rest_destroy (timeutil_rest_t *rest)
 
int64_t utime_now (void)
 
int64_t utime_get_seconds (int64_t v)
 
int64_t utime_get_useconds (int64_t v)
 
void utime_to_timeval (int64_t v, struct timeval *tv)
 
void utime_to_timespec (int64_t v, struct timespec *ts)
 
int32_t timeutil_usleep (int64_t useconds)
 
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)
 
int64_t time_util_hhmmss_ss_to_utime (double time)
 
int64_t timeutil_ms_to_us (int32_t ms)
 

Typedef Documentation

◆ timeutil_rest_t

typedef struct timeutil_rest timeutil_rest_t

Function Documentation

◆ time_util_hhmmss_ss_to_utime()

int64_t time_util_hhmmss_ss_to_utime ( double time)

◆ timeutil_ms_to_us()

int64_t timeutil_ms_to_us ( int32_t ms)

◆ timeutil_rest_create()

timeutil_rest_t * timeutil_rest_create ( void )

◆ timeutil_rest_destroy()

void timeutil_rest_destroy ( timeutil_rest_t * rest)

◆ timeutil_sleep()

uint32_t timeutil_sleep ( unsigned int seconds)

◆ timeutil_sleep_hz()

int32_t timeutil_sleep_hz ( timeutil_rest_t * rest,
double hz )

◆ timeutil_timer_reset()

void timeutil_timer_reset ( timeutil_rest_t * rest)

◆ timeutil_timer_start()

void timeutil_timer_start ( timeutil_rest_t * rest)

◆ timeutil_timer_stop()

void timeutil_timer_stop ( timeutil_rest_t * rest)

◆ timeutil_timer_timeout()

bool timeutil_timer_timeout ( timeutil_rest_t * rest,
double timeout_s )

◆ timeutil_usleep()

int32_t timeutil_usleep ( int64_t useconds)

◆ utime_get_seconds()

int64_t utime_get_seconds ( int64_t v)

◆ utime_get_useconds()

int64_t utime_get_useconds ( int64_t v)

◆ utime_now()

int64_t utime_now ( void )

◆ utime_to_timespec()

void utime_to_timespec ( int64_t v,
struct timespec * ts )

◆ utime_to_timeval()

void utime_to_timeval ( int64_t v,
struct timeval * tv )