1
0
Fork 0

Initial commit

This commit is contained in:
Henrik Hautakoski 2015-12-22 17:43:51 +01:00
commit edfc5298e1
252 changed files with 93965 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#include <Windows.h>
#include <Spectre/System/System.h>
static LARGE_INTEGER getFrequency() {
LARGE_INTEGER freq;
::QueryPerformanceFrequency(&freq);
return freq;
}
unsigned long System::getMilliseconds()
{
static LARGE_INTEGER freq = getFrequency();
LARGE_INTEGER cnt;
::QueryPerformanceCounter(&cnt);
cnt.QuadPart *= 1000;
cnt.QuadPart /= freq.QuadPart;
return (unsigned long) cnt.QuadPart;
}
void System::sleep(int milliseconds)
{
::Sleep(milliseconds);
}