Is there a way in C++ on windows to measure time in nanoseconds?
All i can find are linux solutions.
If you can run your own assembly, you could read the CPU's cycle counter and divide a cycle difference it by the CPU's clock rate:
static inline uint64_t get_cycles() { uint64_t t; __asm__ __volatile__ ("rdtsc" : "=A"(t)); return t; }