C++ high precision time measurement in Windows -


i'm interested in measuring specific point in time down nanosecond using c++ in windows. possible? if isn't, possible specific time in microseconds @ least?. library should do, unless suppose it's possible managed code. thanks

if have threaded application running on multicore computer queryperformancecounter can (and will) return different values depending on core code executing on. see this msdn article. (rdtsc has same problem)

this not theoretical problem; ran our application , had conclude reliable time source timegettime has ms precision (which fortunately sufficient in our case). tried fixating thread affinity our threads guarantee each thread got consistent value queryperformancecounter, worked absolutely killed performance in application.

to sum things there isn't reliable timer on windows can used time thing micro second precision (at least not when running on multicore computer).


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -