KVIrc 5.2.6
Developer APIs
KviTimeUtils.h File Reference

Time management. More...

#include "kvi_settings.h"
#include <time.h>
#include <sys/time.h>

Go to the source code of this file.

Classes

class  KviMSecTimeInterval
 A class to retrieve the time interval This works for time intervals a bit longer than 24 days. More...
 

Namespaces

namespace  KviTimeUtils
 Time utilities.
 

Macros

#define kvi_secondsSince(_that_time_t)
 
#define kvi_time_t   time_t
 
#define kvi_timeSpan(_time_now, _time_before)
 
#define kvi_unixTime()
 

Enumerations

enum  KviTimeUtils::FormatTimeSpanFlags { KviTimeUtils::NoLeadingEmptyIntervals = 1 , KviTimeUtils::NoLeadingZeroes = 2 , KviTimeUtils::FillWithHypens = 4 }
 

Functions

QString KviTimeUtils::formatTimeInterval (unsigned int uSeconds, int iFlags=0)
 Returns a string formatted like x d x h xx m xx s.
 
long long KviTimeUtils::getCurrentTimeMills ()
 Returns the current time mills.
 
void kvi_gettimeofday (struct timeval *tmv)
 Gets the time of the day.
 
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.
 

Detailed Description

Time management.

Author
Szymon Stefanek

Macro Definition Documentation

◆ kvi_secondsSince

#define kvi_secondsSince ( _that_time_t)
Value:
kvi_timeSpan(kvi_unixTime(), _that_time_t)
#define kvi_unixTime()
Definition KviTimeUtils.h:39
#define kvi_timeSpan(_time_now, _time_before)
Definition KviTimeUtils.h:40

Referenced by KviConsoleWindow::getWindowListTipText().

◆ kvi_time_t

#define kvi_time_t   time_t

Referenced by KviChannelWindow::activityMeter(), NotifierWindow::addMessage(), KviIrcConnectionUserInfo::awayTime(), KviIrcServerParser::checkCtcpFlood(), KviAvatarCache::cleanup(), KviIrcConnectionStatistics::connectionStartTime(), NotifierWindow::disableFor15Minutes(), NotifierWindow::disableFor1Minute(), NotifierWindow::disableFor30Minutes(), NotifierWindow::disableFor5Minutes(), NotifierWindow::disableFor60Minutes(), NotifierWindow::disableUntilKVIrcRestarted(), NotifierWindow::doShow(), KviChannelWindow::fixActionHistory(), KviChannelWindow::getChannelActivityStats(), KviUserListView::getUserJoinTime(), KviUserListView::getUserLastActionTime(), KviApplication::heartbeat(), KviIrcConnection::heartbeat(), KviChannelWindow::KviChannelWindow(), KviUserListEntry::KviUserListEntry(), KviCachedPixmap::lastAccessTime(), KviIrcConnectionAntiCtcpFloodData::lastCtcpTime(), KviIrcConnectionStatistics::lastMessageTime(), KviIrcConnectionNetsplitDetectorData::lastNetsplitOnQuitTime(), KviIrcConnectionStateData::lastReceivedChannelWhoReply(), KviIrcConnectionStateData::lastReceivedWhoisReply(), KviChannelWindow::lastReceivedWhoReply(), KviIrcConnectionStateData::lastSentChannelWhoRequest(), KviAvatarCache::load(), KviUserListView::nickChange(), KviUserListViewArea::paintEvent(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseNumericEndOfWho(), NotifierWindow::progressUpdate(), KviIrcConnectionStatistics::setConnectionStartTime(), KviIrcConnectionAntiCtcpFloodData::setLastCtcpTime(), KviIrcConnectionStatistics::setLastMessageTime(), KviIrcConnectionNetsplitDetectorData::setLastNetsplitOnQuitTime(), KviIrcConnectionStateData::setLastReceivedChannelWhoReply(), KviIrcConnectionStateData::setLastReceivedWhoisReply(), KviChannelWindow::setLastReceivedWhoReply(), KviIrcConnectionStateData::setLastSentChannelWhoRequest(), KviApplication::themedStyle(), KviApplication::timerEvent(), KviIrcContext::timerEvent(), and KviUserListView::userStats().

◆ kvi_timeSpan

#define kvi_timeSpan ( _time_now,
_time_before )
Value:
((_time_now) - (_time_before))

Referenced by DccFileTransfer::displayPaint(), and HttpFileTransfer::displayPaint().

◆ kvi_unixTime

#define kvi_unixTime ( )
Value:
time(0)

Referenced by DccFileTransfer::abort(), KviChannelWindow::activityMeter(), NotifierWindow::addMessage(), KviChannelWindow::channelAction(), KviIrcServerParser::checkCtcpFlood(), KviAvatarCache::cleanup(), DccFileTransfer::connected(), NotifierWindow::disableFor15Minutes(), NotifierWindow::disableFor1Minute(), NotifierWindow::disableFor30Minutes(), NotifierWindow::disableFor5Minutes(), NotifierWindow::disableFor60Minutes(), NotifierWindow::disableUntilKVIrcRestarted(), HttpFileTransfer::displayPaint(), NotifierWindow::doShow(), DccFileTransfer::event(), InitVectorEngine::fillRandomIV(), KviChannelWindow::getChannelActivityStats(), HttpFileTransfer::HttpFileTransfer(), KviIrcConnection::incomingMessage(), KviIrcConnection::incomingMessageNoFilter(), KviCachedPixmap::KviCachedPixmap(), KviIrcConnectionStateData::KviIrcConnectionStateData(), KviUserListEntry::KviUserListEntry(), KviIrcConnection::linkEstablished(), KviAvatarCache::load(), KviAvatarCache::lookup(), KviUserListView::maybeTip(), KviUserListView::nickChange(), notifier_kvs_fnc_isEnabled(), KviUserListViewArea::paintEvent(), KviIrcServerParser::parseLiteralQuit(), KviIrcServerParser::parseMessage(), KviIrcServerParser::parseNumericBackFromAway(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericWhoisActually(), KviIrcServerParser::parseNumericWhoisAuth(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisChannels(), KviIrcServerParser::parseNumericWhoisIdle(), KviIrcServerParser::parseNumericWhoisOther(), KviIrcServerParser::parseNumericWhoisRegistered(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcServerParser::parseNumericWhowasUser(), NotifierWindow::progressUpdate(), HttpFileTransfer::receivedResponse(), KviAvatarCache::replace(), DccRecvThread::run(), KviIrcConnectionUserInfo::setAway(), NotifierWindow::startAutoHideTimer(), KviApplication::timerEvent(), KviIrcContext::timerEvent(), KviStatusBarConnectionTimer::timerEvent(), KviIrcConnectionRequestQueue::timerSlot(), KviStatusBarAwayIndicator::tipText(), HttpFileTransfer::transferTerminated(), KviCachedPixmap::updateLastAccessTime(), KviUserListView::userAction(), KviUserListView::userAction(), KviUserListView::userAction(), KviUserListView::userActionVerifyMask(), and KviUserListView::userStats().

Function Documentation

◆ kvi_gettimeofday()