how do u mix da heat
This commit is contained in:
parent
dcf3cd2ac2
commit
14b4d72d8a
5 changed files with 280 additions and 191 deletions
41
src/test/test.cpp
Normal file
41
src/test/test.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifdef _WIN64
|
||||
#define UNICODE
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
//#define DllImport __declspec( dllimport )
|
||||
#include <Windows.h>
|
||||
#include <libloaderapi.h>
|
||||
#endif
|
||||
|
||||
#include "../debug.h"
|
||||
#include "../tmrtsc.hpp"
|
||||
|
||||
using namespace tmr;
|
||||
|
||||
#ifdef _WIN64
|
||||
int main(int argc, char** argv){
|
||||
HMODULE dell;
|
||||
DWORD fracaso;
|
||||
int sleep = 1000;
|
||||
|
||||
dell = LoadLibraryExW(TEXT("libtmrtsc.dll"), NULL, NULL);
|
||||
if (dell == NULL) {
|
||||
fracaso = GetLastError();
|
||||
return -1;
|
||||
}
|
||||
TSCTimer* timer = nullptr;
|
||||
fracaso = TSCTimer::getTimer(timer);
|
||||
if(fracaso != OPERATION_SUCCESSFUL)
|
||||
return -2;
|
||||
uint64_t t1 = timer->getTimeStamp();
|
||||
Sleep(sleep);
|
||||
uint64_t t2 = timer->getTimeStamp();
|
||||
uint64_t fr = timer->getBaseFrequency();
|
||||
std::cout << "Windows Momento: \nt1: " << t1 << " t2: " << " fr: " << fr << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
int main(int argc, char** argv){
|
||||
return -9;
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue