summaryrefslogtreecommitdiff
path: root/src/common/time.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-21 13:00:36 +0100
committerHampusM <hampus@hampusmat.com>2022-03-21 13:00:36 +0100
commit757a29d0137b974fff6ddcc945d76e69ae120ecb (patch)
tree1fff46951e30eeae0402e99070e60901bd104eea /src/common/time.cpp
parent12e3713e7705e4353d306ae2ec03abfe8fcd5f55 (diff)
refactor: use MPU6050_light & clean up bloatHEADmaster
Diffstat (limited to 'src/common/time.cpp')
-rw-r--r--src/common/time.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/common/time.cpp b/src/common/time.cpp
deleted file mode 100644
index ee297d7..0000000
--- a/src/common/time.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "time.hpp"
-
-#include <Arduino.h>
-
-namespace common
-{
-
- 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<double>(_time_micros) * MICROS_TO_SECS;
- }
-
- double Time::millisecs() const
- {
- return static_cast<double>(_time_micros) * MICROS_TO_MILLIS;
- }
-
- uint64_t Time::microsecs() const
- {
- return _time_micros;
- }
-
- Time time_now()
- {
- return Time(micros());
- }
-
-} // namespace common