Lumiera  0.pre.03
»edit your freedom«
DummyTick Class Reference

#include "steam/engine/worker/dummy-tick.hpp"

Description

Tick generating service for a periodic callback, with adjustable frequency.

Quick'n dirty implementation!

Definition at line 60 of file dummy-tick.hpp.

Public Member Functions

 DummyTick (Tick callback)
 
void activate (uint fps)
 set the periodic timer to run with a given frequency, starting now. More...
 

Private Types

typedef function< void(void)> Tick
 

Private Member Functions

void timerLoop (Tick periodicFun)
 
- Private Member Functions inherited from ThreadJoinable<>
lib::Result< void > join ()
 put the caller into a blocking wait until this thread has terminated More...
 
- Private Member Functions inherited from ThreadLifecycle< thread::PolicyResultJoin, void >
 ThreadLifecycle (Launch launcher)
 Primary constructor: Launch the new thread with flexible configuration. More...
 
 ThreadLifecycle (string const &threadID, FUN &&threadFunction, ARGS &&...args)
 Create a new thread to execute the given operation. More...
 
 ThreadLifecycle (void(SUB::*memFun)(ARGS...), ARGS ...args)
 Special variant to bind a subclass member function as thread operation. More...
 
 operator bool () const
 Is this thread »active« and thus tied to OS resources? More...
 
 ThreadLifecycle ()
 derived classes may create a disabled thread
 

Private Attributes

volatile uint timespan_
 

Static Private Attributes

static const uint POLL_TIMEOUT = 1000
 poll interval for new settings in wait state
 

Additional Inherited Members

- Static Private Member Functions inherited from ThreadLifecycle< thread::PolicyResultJoin, void >
static auto buildInvocation (W &wrapper, tuple< INVO... > &&invocation)
 Build the invocation tuple, using #invokeThreadFunction to delegate to the user-provided functor and arguments.
 
static auto buildLauncher (INVO &&...args)
 Build a λ actually to launch the given thread operation later, after the thread-wrapper-object is fully initialised. More...
 

Member Function Documentation

◆ activate()

void activate ( uint  fps)
inline

set the periodic timer to run with a given frequency, starting now.

Well, not actually now, but at the next opportunity. It should be now, but this implementation is sloppy! setting fps==0 halts (pauses) the timer.

Definition at line 93 of file dummy-tick.hpp.

+ Inheritance diagram for DummyTick:
+ Collaboration diagram for DummyTick:

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