* 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
13 lines
No EOL
405 B
C++
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;
|
|
} |