replaced high_resolution_clock with system_time for timestamps

This commit is contained in:
kamilprzyb
2020-09-22 21:15:47 +02:00
parent 0931c88541
commit 7ba9b9a54f
4 changed files with 15 additions and 6 deletions

View File

@@ -149,3 +149,11 @@ time_t getTime() {
return (time_t)value.count();
}
time_t getTimestamp() {
using namespace std::chrono;
milliseconds value = duration_cast<milliseconds>((time_point_cast<milliseconds>(system_clock::now())).time_since_epoch());
return (time_t)value.count();
}