ASCO Aerial Autonomy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
AsyncTimer Class Reference

Calls given function on a timer in its own thread. More...

#include <async_timer.h>

Public Member Functions

 AsyncTimer (std::function< void()> function, std::chrono::duration< double > timer_duration)
 Constructor. More...
 
virtual ~AsyncTimer ()
 Destructor cleans up running thread. More...
 
void start ()
 Starts running the timer thread. More...
 

Detailed Description

Calls given function on a timer in its own thread.

Constructor & Destructor Documentation

AsyncTimer::AsyncTimer ( std::function< void()>  function,
std::chrono::duration< double >  timer_duration 
)

Constructor.

Parameters
functionFunction to call
timer_durationThe amount of time in between each function call
AsyncTimer::~AsyncTimer ( )
virtual

Destructor cleans up running thread.

Member Function Documentation

void AsyncTimer::start ( )

Starts running the timer thread.


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