igor::iTimerHandle Class Reference

#include <iTimerHandle.h>

Public Member Functions

 iTimerHandle ()=default
 
 iTimerHandle (iTimerTickDelegate timerDelegate, const iaTime &interval, bool oneShot=false)
 
virtual ~iTimerHandle ()
 
iTimerTickEvent & getEventTimerTick ()
 
void setInterval (iaTime interval)
 
iaTime getInterval () const
 
void restart ()
 
void start ()
 
void stop ()
 
void triggerNow ()
 

Protected Member Functions

virtual void handle (iaTime time)
 

Friends

class iTimer
 

Detailed Description

timer handle class

Constructor & Destructor Documentation

◆ iTimerHandle() [1/2]

igor::iTimerHandle::iTimerHandle ( )
default

does nothing

◆ iTimerHandle() [2/2]

igor::iTimerHandle::iTimerHandle ( iTimerTickDelegate  timerDelegate,
const iaTime interval,
bool  oneShot = false 
)

creates timer handle and registers it to the iTimer running with given interval

Parameters
timer_delegatetimer delegate to register
intervalthe length of the interval
oneShotif true the timed even only occurs once

◆ ~iTimerHandle()

igor::iTimerHandle::~iTimerHandle ( )
virtual

unregisters from iTimer

Member Function Documentation

◆ getEventTimerTick()

iTimerTickEvent & igor::iTimerHandle::getEventTimerTick ( )
Returns
timer tick event

◆ getInterval()

iaTime igor::iTimerHandle::getInterval ( ) const

returns current intervall time

◆ handle()

void igor::iTimerHandle::handle ( iaTime  time)
protectedvirtual

calls timer event according to how much time passed by

◆ restart()

void igor::iTimerHandle::restart ( )

restarts timer by resetting to current time

◆ setInterval()

void igor::iTimerHandle::setInterval ( iaTime  interval)

changes timer interval

Parameters
intervalthe length of the intervall

triggers restart()

◆ start()

void igor::iTimerHandle::start ( )

start timer handle

◆ stop()

void igor::iTimerHandle::stop ( )

stop timer handle

◆ triggerNow()

void igor::iTimerHandle::triggerNow ( )

what ever the settings this will trigger the timer handle right now and will not interfear with the interval set

Friends And Related Function Documentation

◆ iTimer

friend class iTimer
friend

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