λ61
Loading...
Searching...
No Matches
l61::EventSystem::Timing::AsyncTimer Class Reference

#include <AsyncTimer.hpp>

Inheritance diagram for l61::EventSystem::Timing::AsyncTimer:
l61::EventSystem::Timing::AbstractTimer l61::Object

Public Member Functions

 AsyncTimer (Mode mode)
void start (std::uint32_t duration) override
void reset () override
bool isFinished () const override
bool isRuning () const
 ~AsyncTimer () override=default
Public Member Functions inherited from l61::EventSystem::Timing::AbstractTimer
 AbstractTimer (Mode mode=Mode::MILLISECONDS)
 operator bool () const
Mode getMode () const
virtual ~AbstractTimer ()=default
Public Member Functions inherited from l61::Object
virtual ~Object ()=default
virtual std::string toString () const
 Returns a human-readable string representation of the object.
virtual std::size_t hashCode () const
 Returns a hash code for the object.
std::string typeName () const
 Returns the demangled name of the type.
const std::type_info & typeInfo () const
 Returns RTTI type information object.
virtual nlohmann::json toJsonValue () const
 Serializes the object into JSON form.
 operator std::string () const
 Explicit conversion operator to std::string.
 operator nlohmann::json () const
 Explicit conversion operator to nlohmann::json.

Private Attributes

std::atomic< bool > m_finished {false}
std::atomic< bool > m_running {false}
std::future< void > m_task

Additional Inherited Members

Public Types inherited from l61::EventSystem::Timing::AbstractTimer
enum class  Mode : bool { SECONDS , MILLISECONDS }

Constructor & Destructor Documentation

◆ AsyncTimer()

l61::EventSystem::Timing::AsyncTimer::AsyncTimer ( Mode mode)
explicit

◆ ~AsyncTimer()

l61::EventSystem::Timing::AsyncTimer::~AsyncTimer ( )
overridedefault

Member Function Documentation

◆ isFinished()

bool l61::EventSystem::Timing::AsyncTimer::isFinished ( ) const
overridevirtual

◆ isRuning()

bool l61::EventSystem::Timing::AsyncTimer::isRuning ( ) const

◆ reset()

void l61::EventSystem::Timing::AsyncTimer::reset ( )
overridevirtual

◆ start()

void l61::EventSystem::Timing::AsyncTimer::start ( std::uint32_t duration)
overridevirtual

Member Data Documentation

◆ m_finished

std::atomic<bool> l61::EventSystem::Timing::AsyncTimer::m_finished {false}
private

◆ m_running

std::atomic<bool> l61::EventSystem::Timing::AsyncTimer::m_running {false}
private

◆ m_task

std::future<void> l61::EventSystem::Timing::AsyncTimer::m_task
private

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