OpenCPN Partial API docs
Loading...
Searching...
No Matches
PeriodicTimer Class Referenceabstract

Continuously run Notify with given interval. More...

#include <periodic_timer.h>

Inheritance diagram for PeriodicTimer:
StatsTimer

Public Member Functions

 PeriodicTimer (std::chrono::milliseconds interval)
 
void Stop ()
 

Protected Member Functions

virtual void Notify ()=0
 

Detailed Description

Continuously run Notify with given interval.

Runs from being constructed until Stop() or going out of scope.

To use, derive a subclass and override the Notify() method.

Similar to wxTimer when used in continuous mode. However, it does not depend on wxEventHandler and also has better destructor semantics.

Definition at line 45 of file periodic_timer.h.

Constructor & Destructor Documentation

◆ PeriodicTimer()

PeriodicTimer::PeriodicTimer ( std::chrono::milliseconds  interval)

Definition at line 27 of file periodic_timer.cpp.

◆ ~PeriodicTimer()

PeriodicTimer::~PeriodicTimer ( )
virtual

Definition at line 32 of file periodic_timer.cpp.

Member Function Documentation

◆ Stop()

void PeriodicTimer::Stop ( )

Definition at line 34 of file periodic_timer.cpp.


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