From 01ce0af940bd69c94a2fac8b65219262845cca98 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Feb 2022 18:18:38 +0100 Subject: refactor: clean sewage --- src/utils/time.hpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/utils/time.hpp') 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 /** * 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 -- cgit v1.2.3-18-g5258