Lugdunum
0.1.0
src
lug
System
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
11
Time
Time::getCurrentTime
() {
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
lug::System::Time::_microseconds
int64_t _microseconds
Definition:
Time.hpp:28
lug::System::Time::Time
Time()=default
lug::System::Time
Definition:
Time.hpp:9
lug
Definition:
Application.hpp:11
lug::System::Time::getCurrentTime
static Time getCurrentTime()
Definition:
Time.cpp:11
Clock.hpp
Generated by
1.8.13