You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
335 B
19 lines
335 B
2 years ago
|
#include "utils.h"
|
||
|
|
||
|
double utils::get_time_windows() {
|
||
|
LARGE_INTEGER timer;
|
||
|
static LARGE_INTEGER fre;
|
||
|
static int init = 0;
|
||
|
double t;
|
||
|
|
||
|
if (init != 1) {
|
||
|
QueryPerformanceFrequency(&fre);
|
||
|
init = 1;
|
||
|
}
|
||
|
|
||
|
QueryPerformanceCounter(&timer);
|
||
|
|
||
|
t = timer.QuadPart * 1. / fre.QuadPart;
|
||
|
|
||
|
return t;
|
||
|
}
|