This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/misc/Time.h
2016-04-21 10:15:42 +02:00

22 lines
404 B
C++

#ifndef TIME_H
#define TIME_H
#include <chrono>
class Time {
public:
static std::chrono::system_clock::time_point tick() {
return std::chrono::system_clock::now();
}
static uint32_t diffMS(std::chrono::system_clock::time_point tick1, std::chrono::system_clock::time_point tick2) {
return std::chrono::duration_cast<std::chrono::milliseconds>(tick2 - tick1).count();
}
};
#endif // TIME_H