Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::TimerTask Class Referencefinal

Timer Task. More...

#include <Timer.h>

Inheritance diagram for sese::TimerTask:

Public Types

using Ptr = std::shared_ptr<TimerTask>
 

Public Member Functions

void cancel () noexcept
 Cancel the current timer task.
 

Private Member Functions

 TimerTask ()=default
 

Private Attributes

int64_t sleepTimestamp = 0
 
int64_t targetTimestamp = 0
 
bool isRepeat = false
 
std::function< void()> callback
 
std::function< void()> cancelCallback
 

Friends

class Timer
 

Detailed Description

Timer Task.

Member Typedef Documentation

◆ Ptr

using sese::TimerTask::Ptr = std::shared_ptr<TimerTask>

Constructor & Destructor Documentation

◆ TimerTask()

sese::TimerTask::TimerTask ( )
privatedefault

Member Function Documentation

◆ cancel()

void TimerTask::cancel ( )
noexcept

Cancel the current timer task.

References cancelCallback.

Friends And Related Symbol Documentation

◆ Timer

friend class Timer
friend

Member Data Documentation

◆ callback

std::function<void()> sese::TimerTask::callback
private

◆ cancelCallback

std::function<void()> sese::TimerTask::cancelCallback
private

Referenced by cancel().

◆ isRepeat

bool sese::TimerTask::isRepeat = false
private

◆ sleepTimestamp

int64_t sese::TimerTask::sleepTimestamp = 0
private

◆ targetTimestamp

int64_t sese::TimerTask::targetTimestamp = 0
private

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