![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/time/timevalue.hpp"
Offset measures a distance in time.
It may be used to relate two points in time, or to create a modification for time-like entities. Similar to (basic) time values, offsets can be compared, but are otherwise opaque and immutable. Yet they allow to build derived values, including
Definition at line 365 of file timevalue.hpp.
Static Public Attributes | |
| static const Offset | ZERO |
Static Public Attributes inherited from TimeValue | |
| static const raw_time_64 | SCALE = 1'000'000 |
| Number of micro ticks (µs) per second as basic time scale. | |
Public Member Functions | |
| Offset (TimeValue const &distance=Time::ZERO) | |
| Offset (FSecs const &delta_in_secs) | |
| Offset (Offset const &)=default | |
| Offset (FrameCnt count, FrameRate const &fps) | |
| offset by the given number of frames. | |
| Offset (TimeValue const &origin, TimeValue const &target) | |
| Duration | abs () const |
| interpret the distance given by this offset as a time duration | |
| Offset | stretchedByRationalFactor (boost::rational< int64_t >) const |
| Offset | stretchedByFloatFactor (double) const |
| operator std::string () const | |
| Offset | operator- () const |
| flip offset direction | |
Public Member Functions inherited from TimeValue | |
| TimeValue (raw_time_64 val) | |
| TimeValue (TimeValue const &o) | |
| copy initialisation allowed | |
| operator std::string () const | |
| bool | isRegular () const |
| std::strong_ordering | operator<=> (TimeValue const &) const =default |
| bool | operator== (TimeValue const &) const =default |
| std::strong_ordering | operator<=> (raw_time_64 tt) const |
| bool | operator== (raw_time_64 tt) const |
Protected Member Functions | |
| Offset & | operator= (Offset const &o) |
| generally immutable, but derived classes allow some limited mutation through special API calls | |
Protected Member Functions inherited from TimeValue | |
| TimeValue & | operator= (TimeValue const &o) |
| Assigning of time values is not allowed, but derived classed might allow that. | |
| TimeValue (TimeValue const &origin, TimeValue const &target) | |
Additional Inherited Members | |
Static Public Member Functions inherited from TimeValue | |
| static TimeValue | buildRaw_ (raw_time_64) |
Static Protected Member Functions inherited from TimeValue | |
| static raw_time_64 | limitedTime (raw_time_64 raw) |
| explicit limit of allowed time range | |
| static raw_time_64 | limitedDelta (raw_time_64 origin, raw_time_64 target) |
| safe calculation of explicitly limited time offset | |
Protected Attributes inherited from TimeValue | |
| raw_time_64 | t_ |
| the raw (internal) time value used to implement the time types | |
|
inlineexplicit |
Definition at line 800 of file timevalue.hpp.
Definition at line 390 of file timevalue.hpp.
generally immutable, but derived classes allow some limited mutation through special API calls
Definition at line 373 of file timevalue.hpp.
References TimeValue::operator=().
Here is the call graph for this function:
|
inline |
interpret the distance given by this offset as a time duration
Definition at line 847 of file timevalue.hpp.
Referenced by TimeValue_test::buildDuration(), and TimeValue_test::createOffsets().
Here is the caller graph for this function:| Offset stretchedByRationalFactor | ( | boost::rational< int64_t > | factor | ) | const |
stretch offset by a possibly fractional factor, and quantise into raw (micro tick) grid
Definition at line 357 of file time.cpp.
References TimeValue::buildRaw_(), and TimeValue::t_.
Referenced by lib::time::operator*().
Here is the call graph for this function:
Here is the caller graph for this function:| Offset stretchedByFloatFactor | ( | double | factor | ) | const |
2^52 ≈ 4.5e15 Definition at line 368 of file time.cpp.
References TimeValue::buildRaw_(), and TimeValue::t_.
Referenced by lib::time::operator*().
Here is the call graph for this function:
Here is the caller graph for this function:
|
explicit |
diagnostics, indicating ∆
|
inline |
flip offset direction
Definition at line 461 of file timevalue.hpp.
|
static |
Definition at line 394 of file timevalue.hpp.
Referenced by SchedulerLoadControl_test::classifyHorizon(), Control< TI >::connectChangeNotification(), and LoadController::scatteredDelayTime().
Inheritance diagram for Offset:
Collaboration diagram for Offset: