[lib] Add timestamp_is_null()
This commit is contained in:
parent
161157dae7
commit
7fa5819544
|
@ -137,6 +137,13 @@ owl_timestamp owl_timeval_to_timestamp(const struct timeval d)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
owl_bool owl_timestamp_is_null(owl_timestamp d)
|
||||||
|
{
|
||||||
|
return d.tv_sec == 0 && d.tv_nsec == 0 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Converts a owl_timestamp date value into milliseconds.
|
* Converts a owl_timestamp date value into milliseconds.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -249,6 +249,7 @@ int owl_timestamp_now(owl_timestamp *now) ;
|
||||||
owl_timestamp owl_timespec_to_timestamp(const struct timespec d) ;
|
owl_timestamp owl_timespec_to_timestamp(const struct timespec d) ;
|
||||||
owl_timestamp owl_timeval_to_timestamp(const struct timeval d) ;
|
owl_timestamp owl_timeval_to_timestamp(const struct timeval d) ;
|
||||||
void owl_timestamp_to_string(char *dst, owl_timestamp src) ;
|
void owl_timestamp_to_string(char *dst, owl_timestamp src) ;
|
||||||
|
owl_bool owl_timestamp_is_null(owl_timestamp d) ;
|
||||||
uint64_t owl_timestamp_to_ms(owl_timestamp date) ;
|
uint64_t owl_timestamp_to_ms(owl_timestamp date) ;
|
||||||
uint_fast32_t owl_time_elapsed_ms(const owl_timestamp d1,
|
uint_fast32_t owl_time_elapsed_ms(const owl_timestamp d1,
|
||||||
const owl_timestamp d2) ;
|
const owl_timestamp d2) ;
|
||||||
|
|
Loading…
Reference in New Issue