Merge pull request #110 from kamilprzyb/vehicles_pr

Fixed Time and implemented vehicles expiring
This commit is contained in:
2020-09-23 14:48:38 -05:00
committed by GitHub
10 changed files with 112 additions and 8 deletions

View File

@@ -150,3 +150,12 @@ time_t getTime() {
return (time_t)value.count();
}
// returns system time in seconds
time_t getTimestamp() {
using namespace std::chrono;
seconds value = duration_cast<seconds>((time_point_cast<seconds>(system_clock::now())).time_since_epoch());
return (time_t)value.count();
}