KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Attributes | List of all members
KviMSecTimeInterval Class Reference

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

#include <KviTimeUtils.h>

Public Member Functions

 KviMSecTimeInterval ()
 
unsigned long mark ()
 Returns the number of milliseconds. The amount is calculated since mark() was last called (and thus marks the beginning of a new interval). More...
 
unsigned long secondsCounter ()
 Returns the number of seconds This wors ONLY in the same second that mark was called in and returns the tv_sec field of the gettimeofday() (remember that gettimeofday() is broken on windows) More...
 

Protected Attributes

unsigned long m_uReferenceSecs
 
unsigned long m_uReferenceUSecs
 

Detailed Description

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

Constructor & Destructor Documentation

KviMSecTimeInterval::KviMSecTimeInterval ( )

Member Function Documentation

unsigned long KviMSecTimeInterval::mark ( )

Returns the number of milliseconds. The amount is calculated since mark() was last called (and thus marks the beginning of a new interval).

Returns
unsigned long

References kvi_gettimeofday(), m_uReferenceSecs, and m_uReferenceUSecs.

Referenced by DccSendThread::run(), DccRecvThread::run(), DccSendThread::updateStats(), and DccRecvThread::updateStats().

unsigned long KviMSecTimeInterval::secondsCounter ( )
inline

Returns the number of seconds This wors ONLY in the same second that mark was called in and returns the tv_sec field of the gettimeofday() (remember that gettimeofday() is broken on windows)

Returns
unsigned long

Referenced by DccSendThread::run(), DccRecvThread::run(), DccSendThread::updateStats(), and DccRecvThread::updateStats().

Member Data Documentation

unsigned long KviMSecTimeInterval::m_uReferenceSecs
protected

Referenced by KviMSecTimeInterval(), and mark().

unsigned long KviMSecTimeInterval::m_uReferenceUSecs
protected

Referenced by KviMSecTimeInterval(), and mark().


The documentation for this class was generated from the following files: