summaryrefslogtreecommitdiff
path: root/include/util/time.h
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2024-01-06 02:31:14 +0100
committerGitHub <[email protected]>2024-01-06 02:31:14 +0100
commit6759e8da7ab53a46b0eb04e5045b8c67262c3a11 (patch)
treec65ed83ca04b61bdbae7e1b8a7f2c16f29b89730 /include/util/time.h
parentb929a2bbadf467864796ad4ec90882ce86cfebff (diff)
parentace97585b2b4d8cbb5ead6cd0f72fa8e8889c9d7 (diff)
Merge pull request #24 from wlrfx/wlroots-0.17-rebase
Rebase to wlroots 0.17
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);