aboutsummaryrefslogtreecommitdiff
path: root/src/timer.cc
blob: c46017c046cfbe27b2a818fb2ccf96217b1d6283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "timer.h"

namespace timer {

std::chrono::time_point<std::chrono::high_resolution_clock> now() {
	return std::chrono::high_resolution_clock::now();
}

double millisecondsSince(
	std::chrono::time_point<std::chrono::high_resolution_clock>& pit) {
	return std::chrono::duration_cast<std::chrono::milliseconds>(
		now() - pit
	).count();
}

}