diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-14 18:18:38 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-14 18:18:38 +0100 |
commit | 01ce0af940bd69c94a2fac8b65219262845cca98 (patch) | |
tree | 97c443782ce1cfba90b205183c8aab1e3edb0bb3 /src/utils/time.hpp | |
parent | cb7a167c7dee2fa1a19bd09ede3bae8b140e79da (diff) |
refactor: clean sewage
Diffstat (limited to 'src/utils/time.hpp')
-rw-r--r-- | src/utils/time.hpp | 17 |
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 |