PDA

View Full Version : How to measure a time difference in miliseconds?



TomASS
26th April 2010, 07:33
Hi,

I'ld like to measure a time difference (in miliseconds) between two operations. How to get a current time in milliseconds?
for example


int microStart = function_time_in_miliiseconds();
operationr1();
int microEnd = function_time_in_miliiseconds();
ind difference = microEnd-mircoStart;
thanks

aamer4yu
26th April 2010, 07:39
QTime time;
time.start();
// operation
int difference = time.elapsed();

TomASS
26th April 2010, 07:58
Thank you, that's what i'm saying :)