std::chrono::system_clock::time_point start;
std::cout << (std::chrono::high_resolution_clock::now()-start).count();
The above code after 1 second in Visual Studio 2012 gives me 10000000, but in gcc 4.8.2 gives me 100000000.
Changing the last line to std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now()-start).count();works as expected and gives me the same result for both compilers.
How is this possible?
source
share