util: add timespec_to_nsec

This commit is contained in:
Rose Hudson 2023-06-05 16:26:50 +01:00 committed by Simon Ser
parent 37b5f8a89e
commit bd834fe8d1
2 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,11 @@ int64_t get_current_time_msec(void);
*/
int64_t timespec_to_msec(const struct timespec *a);
/**
* Convert a timespec to nanoseconds.
*/
int64_t timespec_to_nsec(const struct timespec *a);
/**
* Convert nanoseconds to a timespec.
*/