aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/timestamp.cpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
commitfe9648fa1cdc8f9cf5216a88fadb8b96604047fd (patch)
tree011b7956b38a08b771d349866f9fabc0d5689fc9 /src/base/timestamp.cpp
parent0d9371a00c47991e9f62053b649d39e9504680d8 (diff)
downloadusdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.gz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.xz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.zip
base/time: Replaces by std::chrono.
Diffstat (limited to 'src/base/timestamp.cpp')
-rw-r--r--src/base/timestamp.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/base/timestamp.cpp b/src/base/timestamp.cpp
index 1e86a8d4..c92ef99c 100644
--- a/src/base/timestamp.cpp
+++ b/src/base/timestamp.cpp
@@ -23,22 +23,21 @@
*/
#include "timestamp.hpp"
-#include "time.hpp"
namespace usdx
{
Timestamp::Timestamp(void)
- : time(Time::get_time())
+ : time(std::chrono::steady_clock::now())
{
}
- bool Timestamp::since(float duration) const
+ bool Timestamp::since(std::chrono::milliseconds duration) const
{
- return Time::get_time() < (time + duration);
+ return std::chrono::steady_clock::now() < (time + duration);
}
void Timestamp::update(void)
{
- time = Time::get_time();
+ time = std::chrono::steady_clock::now();
}
}