STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Static Public Member Functions | Public Types
stapl::runtime::timer< Clock > Class Template Reference

Provides a timer mechanism. More...

Public Member Functions

 timer (const duration t=duration::zero()) noexcept
 
void reset (void) noexcept
 
void reset (const duration t) noexcept
 Resets this timer and sets a different timeout.
 
bool expired (const time_point t=now()) const noexcept
 Returns if the timer is expired.
 
duration remaining (void) const noexcept
 Returns the time until timer::expired()==true in milliseconds.
 

Static Public Member Functions

static time_point now (void) noexcept
 Returns the current time.
 

Public Types

using duration = std::chrono::milliseconds
 
using time_point = typename Clock::time_point
 

Detailed Description

template<typename Clock = std::chrono::high_resolution_clock>
class stapl::runtime::timer< Clock >

Provides a timer mechanism.

The caller has to start the timer and check at regular intervals if it expired. It is assumed that it has milliseconds accuracy but it is not guaranteed that it will expire at the exact timeout.


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