[Qt-interest] using Qtime
Sean Harmer
sean.harmer at maps-technology.com
Fri Nov 20 17:27:41 CET 2009
Hi,
On Friday 20 November 2009 16:05:34 slheitz at rockwellcollins.com wrote:
> The functions restart and timeelapsed in QTime say they retrun the time
> difference from when start or restart was last called.
>
> I'm seeing that they actually return the actualy time at that time. so to
> get the difference I have had to do I delta between the last restart and
> the current one.
>
>
> Is the documentation incorrect?
No. QTime works fine here like this:
QTime t;
t.start();
// do something...
qDebug() << "Task took" << t.elapsed() << "ms";
works here on Qt-4.5.x on desktop and embedded linux.
Are you calling QTime::start() anywhere? This is what sets the reference
datum.
Sean
More information about the Qt-interest-old
mailing list