From a119e6ca70ffab14f0a70908fa3eeb83b41bb5ab Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Mar 2022 10:24:36 +0100 Subject: refactor: rename std to common --- src/std/time.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/std/time.cpp (limited to 'src/std/time.cpp') diff --git a/src/std/time.cpp b/src/std/time.cpp deleted file mode 100644 index cca8955..0000000 --- a/src/std/time.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "time.hpp" - -#include - -Time::Time(uint64_t time_micros) : _time_micros(time_micros) -{ -} - -void Time::update() -{ - _time_micros = micros(); -} - -Time Time::diff(Time prev_time) const -{ - return Time(_time_micros - prev_time.microsecs()); -} - -double Time::secs() const -{ - return static_cast(_time_micros) * MICROS_TO_SECS; -} - -double Time::millisecs() const -{ - return static_cast(_time_micros) * MICROS_TO_MILLIS; -} - -uint64_t Time::microsecs() const -{ - return _time_micros; -} - -Time time_now() -{ - return Time(micros()); -} -- cgit v1.2.3-18-g5258