cpplab/app/clock.cpp
balhau@balhau.net 9e821b96a7
Refactor on premake5 more on types
* Refactor platform/types.hpp, added some support for x86 32bit types
* Refactor platform/platform.hpp, add #ifdef conditionals to detect x86,
32bit and 64bit arch
* Implement 32bit and 64bit getTimestamp based in assembly rdtsc. For
32bit a struct composed by two 32bit numbers was devised to represent a
ULong data type of 64bits
2021-12-26 13:55:10 +00:00

13 lines
No EOL
405 B
C++

#include <iostream>
#include "../src/cpu/x86/clock.hpp"
int main(void){
cpu::Clock *clock = new cpu::X86Clock();
std::cout << "Hello 1 -- " << clock->getTimestamp() <<std::endl;
std::cout << "Hello 2 -- " << clock->getTimestamp() <<std::endl;
delete clock;
//std::cout << "Hello 3 -- " << getTimestamp() <<std::endl;
//std::cout << "Hello 4 -- " << getTimestamp() <<std::endl;
}