Logo Search packages:      
Sourcecode: qt4-x11 version File versions

int QTime::msecsTo ( const QTime t  )  const

Returns the number of milliseconds from this time to t. If t is earlier than this time, the number of milliseconds returned is negative.

Because QTime measures time within a day and there are 86400 seconds in a day, the result is always between -86400000 and 86400000 ms.

See also:
secsTo(), addMSecs()

Definition at line 1578 of file qdatetime.cpp.

References ds().

Referenced by elapsed(), and restart().

{
#if defined(Q_OS_WINCE)
    // GetLocalTime() for Windows CE has no milliseconds resolution
    if (t.startTick > NullTime && startTick > NullTime)
        return t.startTick - startTick;
    else
#endif
        return t.ds() - ds();
}


Generated by  Doxygen 1.6.0   Back to index