mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-31 22:12:12 +00:00
15 lines
281 B
C++
15 lines
281 B
C++
#include "timer.h"
|
|
|
|
Timer::Timer() {
|
|
Reset();
|
|
}
|
|
|
|
void Timer::Reset() {
|
|
start = Clock::now();
|
|
}
|
|
|
|
long long Timer::ElapsedMilliseconds() {
|
|
std::chrono::time_point<Clock> end = Clock::now();
|
|
return std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
|
|
}
|