Lugdunum  0.1.0
Time.cpp
Go to the documentation of this file.
1 #include <chrono>
2 #include <lug/System/Clock.hpp>
3 
4 namespace lug {
5 namespace System {
6 
7 Time::Time(const Time& time) : _microseconds(time._microseconds) {}
8 
9 Time::Time(int64_t microseconds) : _microseconds(microseconds) {}
10 
12  std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
13  int64_t microseconds = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch()).count();
14  return Time(microseconds);
15 }
16 
17 } // System
18 } // lug
int64_t _microseconds
Definition: Time.hpp:28
static Time getCurrentTime()
Definition: Time.cpp:11