|
resonance 1.0.1
|
Task the scheduler runs again every fixed number of nanoseconds. More...
#include <timetask.h>


Public Member Functions | |
| TimeTask (Sch::TimeClock *pClock, long long nPeriodNs) | |
| virtual | ~TimeTask () |
| Withdraw the queued command. | |
| virtual void | Print (std::ostream &stream) |
| Write the literal {TimeTask} to a diagnostic stream. | |
| virtual int | Tick (long long nElapsedNs)=0 |
| Run the task. | |
| void | Start (long long nEpochOffsetNs) |
| Start the task now and run it at once. | |
| void | Run () |
| Run Tick() for the run now due and post the next one. | |
| void | Stop () |
| Withdraw the queued command and forget its handle. | |
| Public Member Functions inherited from Attachment | |
| Attachment () | |
| virtual | ~Attachment () |
| int | Release () |
| Give back one reference and destroy the object once the last one is gone. | |
| virtual void | Destroy () |
| Destroy the object. | |
Static Public Attributes | |
| static constexpr long long | kNoEpochOffset = -1000000 |
| The epoch offset Start() treats as an epoch at zero. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Attachment | |
| static void | ReleaseIfSet (Attachment *pAttachment) |
| Give back one reference to an object that may be null. | |
| Public Attributes inherited from Attachment | |
| int | mRefs |
Task the scheduler runs again every fixed number of nanoseconds.
It has Attachment as its one base, and it is named after AppTimeTask.cpp, the translation unit its file-local Cmd class records. It is the nanosecond counterpart of TickTask. Its vtable is at 0x007d31a8, and slot 4, Tick(), is pure. Synth::Setup::SynthFade is the one recovered subclass.
The object is 0x28 bytes. The Attachment base supplies the reference count at +0x00 and the vptr at +0x04.
| TimeTask::TimeTask | ( | Sch::TimeClock * | pClock, |
| long long | nPeriodNs ) |
| pClock | The clock the task is posted against. |
| nPeriodNs | Nanoseconds between one run and the next. |
|
virtual |
Withdraw the queued command.
|
virtual |
Write the literal {TimeTask} to a diagnostic stream.
Table slot 3.
| stream | The stream to write to. |
|
pure virtual |
Run the task.
Table slot 4, and the one pure member of the class.
| nElapsedNs | Nanoseconds between the epoch and the run now due. |
| void TimeTask::Start | ( | long long | nEpochOffsetNs | ) |
Start the task now and run it at once.
Reads the clock into mNextNs and measures mEpochNs from it, then runs Run(). The title is inferred.
| nEpochOffsetNs | Nanoseconds the epoch lies before now, or kNoEpochOffset for an epoch at zero. |
| void TimeTask::Run | ( | ) |
Run Tick() for the run now due and post the next one.
The file-local Cmd's Execute() is the caller. The title is inferred.
| void TimeTask::Stop | ( | ) |
Withdraw the queued command and forget its handle.
The title is inferred.
|
staticconstexpr |
The epoch offset Start() treats as an epoch at zero.