summaryrefslogtreecommitdiff
path: root/src/utils/time.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/time.hpp')
-rw-r--r--src/utils/time.hpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/utils/time.hpp b/src/utils/time.hpp
index e0385ef..1577bb7 100644
--- a/src/utils/time.hpp
+++ b/src/utils/time.hpp
@@ -1,5 +1,6 @@
-#ifndef TIME_HPP
-#define TIME_HPP
+#pragma once
+
+#include <stdint.h>
/**
* A representation of time.
@@ -12,7 +13,7 @@ public:
*
* @param time_micros Time in microseconds
*/
- Time(unsigned long time_micros);
+ explicit Time(uint64_t time_micros);
/**
* Updates the time to the current time.
@@ -29,25 +30,23 @@ public:
/**
* Returns the time in seconds.
*/
- float secs();
+ double secs();
/**
* Returns the time in milliseconds.
*/
- unsigned long millisecs();
+ double millisecs();
/**
* Returns the time in microseconds.
*/
- unsigned long microsecs();
+ uint64_t microsecs();
private:
- unsigned long _time_micros;
+ uint64_t _time_micros;
};
/**
* Returns a time object for the time since the program started.
*/
Time time_now();
-
-#endif