libusual  0.1
Defines | Typedefs | Functions
usual/time.h File Reference

*Time-related functionality. More...

Defines

#define USEC
 How many microseconds in a second.

Typedefs

typedef uint64_t usec_t
 Type to hold microseconds.

Functions

char * format_time_ms (usec_t time, char *dst, unsigned dstlen)
 Convert usec timestamp to ISO timestamp with millisecond precision: YYYY-mm-dd hh:mm:ss.SSS.
char * format_time_s (usec_t time, char *dst, unsigned dstlen)
 Convert usec timestamp to ISO timestamp with second precision: YYYY-mm-dd hh:mm:ss.
usec_t get_time_usec (void)
 Query system time.
usec_t get_cached_time (void)
 Query cached system time.
void reset_time_cache (void)
 Forget cached system time, next call will fill it.

Detailed Description

*

Time-related functionality.


Define Documentation

#define USEC

How many microseconds in a second.


Typedef Documentation

typedef uint64_t usec_t

Type to hold microseconds.


Function Documentation

char* format_time_ms ( usec_t  time,
char *  dst,
unsigned  dstlen 
)

Convert usec timestamp to ISO timestamp with millisecond precision: YYYY-mm-dd hh:mm:ss.SSS.

char* format_time_s ( usec_t  time,
char *  dst,
unsigned  dstlen 
)

Convert usec timestamp to ISO timestamp with second precision: YYYY-mm-dd hh:mm:ss.

usec_t get_time_usec ( void  )

Query system time.

usec_t get_cached_time ( void  )

Query cached system time.

void reset_time_cache ( void  )

Forget cached system time, next call will fill it.