KVIrc  4.9.2
DeveloperAPIs
Classes | Namespaces | Macros | Enumerations | Functions
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

 KviTimeUtils
 Time utilities.
 

Macros

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

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. More...
 
long long KviTimeUtils::getCurrentTimeMills ()
 Returns the current time mills. More...
 
void kvi_gettimeofday (struct timeval *tmv, struct timezone *tmz)
 Gets the time of the day. More...
 
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. More...
 

Detailed Description

Time management.

Author
Szymon Stefanek

Macro Definition Documentation

#define kvi_secondsSince (   _that_time_t)    kvi_timeSpan(kvi_unixTime(), _that_time_t)
#define kvi_time_t   time_t
#define kvi_timeSpan (   _time_now,
  _time_before 
)    ((_time_now) - (_time_before))
#define kvi_unixTime ( )    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(), NotifierWindow::progressUpdate(), HttpFileTransfer::receivedResponse(), KviAvatarCache::replace(), DccRecvThread::run(), KviIrcConnectionUserInfo::setAway(), NotifierWindow::startAutoHideTimer(), KviStatusBarClock::timerEvent(), KviStatusBarConnectionTimer::timerEvent(), KviIrcContext::timerEvent(), KviApplication::timerEvent(), KviIrcConnectionRequestQueue::timerSlot(), KviStatusBarAwayIndicator::tipText(), HttpFileTransfer::transferTerminated(), KviCachedPixmap::updateLastAccessTime(), KviUserListView::userAction(), KviUserListView::userActionVerifyMask(), and KviUserListView::userStats().

Function Documentation

void kvi_gettimeofday ( struct timeval *  tmv,
struct timezone *  tmz 
)
inline