diff options
author | Erik Reider <[email protected]> | 2023-12-30 11:25:16 +0100 |
---|---|---|
committer | Erik Reider <[email protected]> | 2024-01-02 11:21:58 +0100 |
commit | 0b52aa9d137b03017313e028accc92dc5d536440 (patch) | |
tree | 06649993526e0a339fff34f0ae8b4c8ec2fa4d13 /include/util/time.h | |
parent | b929a2bbadf467864796ad4ec90882ce86cfebff (diff) |
Initial rebase without effects
Diffstat (limited to 'include/util/time.h')
-rw-r--r-- | include/util/time.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/util/time.h b/include/util/time.h index 287698d..3f76aa4 100644 --- a/include/util/time.h +++ b/include/util/time.h @@ -1,12 +1,13 @@ #ifndef UTIL_TIME_H #define UTIL_TIME_H +#include <stdint.h> #include <time.h> /** * Get the current time, in milliseconds. */ -uint32_t get_current_time_msec(void); +int64_t get_current_time_msec(void); /** * Convert a timespec to milliseconds. @@ -14,6 +15,11 @@ uint32_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. */ void timespec_from_nsec(struct timespec *r, int64_t nsec); |