vdr 2.7.2
cTimeMs Class Reference

#include <tools.h>

Public Member Functions

 cTimeMs (int Ms=0)
 
void Set (int Ms=0)
 
bool TimedOut (void) const
 
uint64_t Elapsed (void) const
 

Static Public Member Functions

static uint64_t Now (void)
 

Private Attributes

uint64_t begin
 

Detailed Description

Definition at line 404 of file tools.h.

Constructor & Destructor Documentation

◆ cTimeMs()

cTimeMs::cTimeMs ( int Ms = 0)

Creates a timer with ms resolution and an initial timeout of Ms.

If Ms is negative the timer is not initialized with the current time.

Definition at line 754 of file tools.c.

References begin, and Set().

Member Function Documentation

◆ Elapsed()

◆ Now()

uint64_t cTimeMs::Now ( void )
static

Definition at line 762 of file tools.c.

References dsyslog, and esyslog.

Referenced by cTrueColorDemo::Action(), Elapsed(), Set(), and TimedOut().

◆ Set()

void cTimeMs::Set ( int Ms = 0)

Sets the timer.

If Ms is 0, call Elapsed() to get the number of milliseconds since the timer has been set. If Ms is greater than 0, TimedOut() returns true as soon as Ms milliseconds have passed since calling Set(). If Ms is negative, results are undefined. Depending on the value of Ms, an object of cTimeMs can handle either timeouts or elapsed times, not both at the same time.

Definition at line 805 of file tools.c.

References begin, and Now().

Referenced by cDvbSubtitleConverter::Action(), cDvbTuner::Action(), cKbdRemote::Action(), cLircUsrRemote::Action(), cRcuRemote::Action(), cRecorder::Action(), cCiTransportConnection::cCiTransportConnection(), cDisplayChannel::cDisplayChannel(), cDisplayChannel::cDisplayChannel(), cDisplaySubtitleTracks::cDisplaySubtitleTracks(), cDisplayTracks::cDisplayTracks(), cDisplayVolume::cDisplayVolume(), cPictureControl::cPictureControl(), cSVDRPClient::cSVDRPClient(), cTimeMs(), cDisplayChannel::DisplayChannel(), cDisplayChannel::DisplayInfo(), cRemote::Get(), cAdaptiveSkipper::GetValue(), cMenuChannels::Number(), cCamSlot::Process(), cCiConditionalAccessSupport::Process(), cCiTransportConnection::Process(), cPatFilter::Process(), cSVDRPClient::Process(), cDisplayChannel::ProcessKey(), cDisplaySubtitleTracks::ProcessKey(), cDisplayTracks::ProcessKey(), cDisplayVolume::ProcessKey(), cMenuEditStrItem::ProcessKey(), cPictureControl::ProcessKey(), cSVDRPClient::Send(), cCiTransportConnection::SendTPDU(), cPatFilter::SetStatus(), cSectionHandler::SetStatus(), cReplayControl::ShowProgress(), cPositioner::StartMovementTimer(), and cPatFilter::SwitchToNextPmtPid().

◆ TimedOut()

Member Data Documentation

◆ begin

uint64_t cTimeMs::begin
private

Definition at line 406 of file tools.h.

Referenced by cTimeMs(), Elapsed(), Set(), and TimedOut().


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