KVIrc
4.9.2
DeveloperAPIs
|
Time utilities. More...
Enumerations | |
enum | FormatTimeSpanFlags { NoLeadingEmptyIntervals = 1, NoLeadingZeroes = 2, FillWithHypens = 4 } |
Functions | |
QString | formatTimeInterval (unsigned int uSeconds, int iFlags=0) |
Returns a string formatted like x d x h xx m xx s. More... | |
long long | getCurrentTimeMills () |
Returns the current time mills. More... | |
void | secondsToDaysHoursMinsSecs (unsigned int uSecs, unsigned int *uD, unsigned int *uH, unsigned int *uM, unsigned int *uS) |
Splits the time span uSecs in days, hours, minutes and seconds. More... | |
Time utilities.
KVILIB_API QString KviTimeUtils::formatTimeInterval | ( | unsigned int | uSeconds, |
int | iFlags = 0 |
||
) |
Returns a string formatted like x d x h xx m xx s.
uSeconds | The number of seconds to format |
iFlags | The flags to format the time string |
References __tr2qs, d, FillWithHypens, h, m, NoLeadingEmptyIntervals, NoLeadingZeroes, s, and secondsToDaysHoursMinsSecs().
Referenced by DccFileTransfer::displayPaint(), KviConsoleWindow::getWindowListTipText(), KviStatusBarConnectionTimer::timerEvent(), and KviStatusBarAwayIndicator::tipText().
KVILIB_API long long KviTimeUtils::getCurrentTimeMills | ( | ) |
Returns the current time mills.
References kvi_gettimeofday().
Referenced by KviAnimatedPixmapCache::internalScheduleFrameChange(), and KviAnimatedPixmapCache::timeoutEvent().
KVILIB_API void KviTimeUtils::secondsToDaysHoursMinsSecs | ( | unsigned int | uSecs, |
unsigned int * | uD, | ||
unsigned int * | uH, | ||
unsigned int * | uM, | ||
unsigned int * | uS | ||
) |
Splits the time span uSecs in days, hours, minutes and seconds.
uSecs | The amount of seconds to span |
uD | Where to store days data |
uH | Where to store hours data |
uM | Where to store minutes data |
uS | Where to store seconds data |
Referenced by HttpFileTransfer::displayPaint(), and formatTimeInterval().