Sets this time to the current time and returns the number of milliseconds that have elapsed since the last time start() or restart() was called.
This function is guaranteed to be atomic and is thus very handy for repeated measurements. Call start() to start the first measurement, and restart() for each later measurement.
Note that the counter wraps to zero 24 hours after the last call to start() or restart().
- If the system's clock setting has been changed since the last time start() or restart() was called, the result is undefined. This can happen when daylight savings time is turned on or off.
- See also:
- start(), elapsed(), currentTime()
Definition at line 1845 of file qdatetime.cpp.
References currentTime(), and msecsTo().