added several grid-walks
added new helper methods/classes (e.g. for heading) new test cases optimize the dijkstra cleanups/refactoring added timed-benchmarks to the log many more...
This commit is contained in:
21
misc/Time.h
Normal file
21
misc/Time.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#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 int 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
|
||||
Reference in New Issue
Block a user