Files
openpilot-evo/panda/drivers/windows/pandaJ2534DLL Test/Timer.h
T
Vehicle Researcher 6c702630ac Merge commit '9b8e11b10c8e13193eeb95c5f94ab4bf3f021980' as 'panda'
old-commit-hash: 14fb17e22fe4020a46b7be8ef486dddb5210ef08
2017-12-23 17:10:42 -08:00

20 lines
397 B
C++

#pragma once
#include <chrono>
//Copied from https://stackoverflow.com/a/31488113
class Timer
{
using clock = std::chrono::steady_clock;
using time_point_type = std::chrono::time_point < clock, std::chrono::milliseconds >;
public:
Timer();
// gets the time elapsed from construction.
unsigned long long /*milliseconds*/ getTimePassed();
void reset();
private:
time_point_type start;
};