Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cTimeTickBase Class Reference

#include <cTimeTick.h>

Inheritance diagram for GrayLib::cTimeTickBase:
GrayLib::cTimeTick GrayLib::cTimeTickMaster

Public Member Functions

bool isTimeValid () const noexcept
 
bool isTimeFuture () const noexcept
 
void InitTime (TIMETICK_t lTimeBase=k_NEVER) noexcept
 
void InitTimeNow ()
 
void InitTimeNowPlusTicks (TIMETICKD_t iOffsetTicks)
 
TIMETICK_t get_TimeTicks () const noexcept
 
 operator TIMETICK_t () const noexcept
 
int GetTimeSinceTick (const cTimeTickBase &time) const noexcept
 
TIMETICKD_t get_TimeTilTick () const
 
TIMETICKD_t get_AgeTick () const
 
void InitTimeNowPlusSec (TIMESECF_t fOffsetSec)
 
TIMESECF_t get_TimeTilSec () const
 
TIMESECF_t get_AgeSec () const
 
cTimeTickBase operator+ (TIMETICKD_t iTimeDiff) const
 
cTimeTickBase operator- (TIMETICKD_t iTimeDiff) const
 
int operator- (cTimeTickBase time) const
 
bool operator== (cTimeTickBase time) const
 
bool operator!= (cTimeTickBase time) const
 
bool operator< (cTimeTickBase time) const
 
bool operator> (cTimeTickBase time) const
 
bool operator<= (cTimeTickBase time) const
 
bool operator>= (cTimeTickBase time) const
 

Static Public Member Functions

static cTimeTickBase GRAYCALL GetTickCount ()
 from cTimeTickMaster More...
 
static TIMETICK_t GRAYCALL GetTickFreq ()
 

Static Public Attributes

static const TIMETICK_t k_NEVER = ((TIMETICK_t)(-1))
 

Protected Attributes

TIMETICK_t m_PrivateTime
 m_nTimeFreq arbitrary frequency More...
 

Detailed Description

My private time units (in a simulation). Fair accuracy and resolution for 32 bits. Arbitrary number of ticks per second. based on cTimeTickMaster Not initialized.

Member Function Documentation

◆ get_AgeSec()

TIMESECF_t GrayLib::cTimeTickBase::get_AgeSec ( ) const
inline

◆ get_AgeTick()

TIMETICKD_t GrayLib::cTimeTickBase::get_AgeTick ( ) const
inline

How old is this (in ticks)? current time - this time. In m_nTimeFreq

◆ get_TimeTicks()

TIMETICK_t GrayLib::cTimeTickBase::get_TimeTicks ( ) const
inlinenoexcept

◆ get_TimeTilSec()

TIMESECF_t GrayLib::cTimeTickBase::get_TimeTilSec ( ) const
inline
Returns
seconds.

◆ get_TimeTilTick()

TIMETICKD_t GrayLib::cTimeTickBase::get_TimeTilTick ( ) const
inline

How long till this happens? this time - current time.

  • = this timer is in the future.
  • = this timer is in the past. In m_nTimeFreq

◆ GetTickCount()

cTimeTickBase GRAYCALL GrayLib::cTimeTickBase::GetTickCount ( )
inlinestatic

from cTimeTickMaster

Get the current time (in ticks) from cTimeTickMaster m_nTimeFreq GetCurrentTime(); is macroed by windows to GetTickCount !!!

◆ GetTickFreq()

TIMETICK_t GRAYCALL GrayLib::cTimeTickBase::GetTickFreq ( )
inlinestatic

Get ticks per real second.

◆ GetTimeSinceTick()

int GrayLib::cTimeTickBase::GetTimeSinceTick ( const cTimeTickBase time) const
inlinenoexcept
Returns
in m_nTimeFreq
  • = this timer is in the future of time.

◆ InitTime()

void GrayLib::cTimeTickBase::InitTime ( TIMETICK_t  lTimeBase = k_NEVER)
inlinenoexcept

◆ InitTimeNow()

void GrayLib::cTimeTickBase::InitTimeNow ( )
inline

◆ InitTimeNowPlusSec()

void GrayLib::cTimeTickBase::InitTimeNowPlusSec ( TIMESECF_t  fOffsetSec)
inline

fOffsetSec = seconds.

◆ InitTimeNowPlusTicks()

void GrayLib::cTimeTickBase::InitTimeNowPlusTicks ( TIMETICKD_t  iOffsetTicks)
inline

◆ isTimeFuture()

bool GrayLib::cTimeTickBase::isTimeFuture ( ) const
inlinenoexcept

◆ isTimeValid()

bool GrayLib::cTimeTickBase::isTimeValid ( ) const
inlinenoexcept

◆ operator TIMETICK_t()

GrayLib::cTimeTickBase::operator TIMETICK_t ( ) const
inlinenoexcept

◆ operator!=()

bool GrayLib::cTimeTickBase::operator!= ( cTimeTickBase  time) const
inline

◆ operator+()

cTimeTickBase GrayLib::cTimeTickBase::operator+ ( TIMETICKD_t  iTimeDiff) const
inline

◆ operator-() [1/2]

int GrayLib::cTimeTickBase::operator- ( cTimeTickBase  time) const
inline

◆ operator-() [2/2]

cTimeTickBase GrayLib::cTimeTickBase::operator- ( TIMETICKD_t  iTimeDiff) const
inline

◆ operator<()

bool GrayLib::cTimeTickBase::operator< ( cTimeTickBase  time) const
inline

◆ operator<=()

bool GrayLib::cTimeTickBase::operator<= ( cTimeTickBase  time) const
inline

◆ operator==()

bool GrayLib::cTimeTickBase::operator== ( cTimeTickBase  time) const
inline

◆ operator>()

bool GrayLib::cTimeTickBase::operator> ( cTimeTickBase  time) const
inline

◆ operator>=()

bool GrayLib::cTimeTickBase::operator>= ( cTimeTickBase  time) const
inline

Member Data Documentation

◆ k_NEVER

const TIMETICK_t GrayLib::cTimeTickBase::k_NEVER = ((TIMETICK_t)(-1))
static

◆ m_PrivateTime

TIMETICK_t GrayLib::cTimeTickBase::m_PrivateTime
protected

m_nTimeFreq arbitrary frequency


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