Is there a way in C++ on windows to measure time in nanoseconds?
All i can find are linux solutions.
Use Windows7 and the Hardware Counter Profiling API http://msdn.microsoft.com/en-us/library/windows/desktop/dd796395(v=vs.85).aspx
Both rdtsc and QueryPerformanceCounter/QueryPerformanceFrequency are not accurate enough because of the large overhead, interrupts and task switches.
[EDIT]: Sorry mixed up the link for PerformanceCounter with Hardware Counters. Sorry have used it only once and this was a quick answer.