summaryrefslogtreecommitdiff
path: root/include/util/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/util/time.h')
-rw-r--r--include/util/time.h8
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);