Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
Time Class Reference

#include "lib/time/timevalue.hpp"

Description

Lumiera's internal time value datatype.

This is a TimeValue, but now more specifically denoting a point in time, measured in reference to an internal (opaque) time scale.

Lumiera Time provides some limited capabilities for direct manipulation; Time values can be created directly from (ms,sec,min,hour) specification and there is an string representation intended for internal use (reporting and debugging). Any real output, formatting and persistent storage should be based on the (quantised) timecode formats though, which can be generated from time values.

Similar to TimeValue, also Time objects are considered immutable values. As convenience shortcut, some operators are provided, creating a TimVar for further calculations.

Examples
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 304 of file timevalue.hpp.

Static Public Attributes

static const Time MAX
 
static const Time MIN
 
static const Time ZERO
 
static const Time ANYTIME
 border condition marker value. ANYTIME <= any time value
 
static const Time NEVER
 border condition marker value. NEVER >= any time value
 
- 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

 Time (TimeValue const &val=TimeValue(0))
 
 Time (FSecs const &fractionalSeconds)
 convenience constructor to build an Time value from a fraction of seconds, given as rational number.
 
 Time (Time const &)=default
 
 Time (TimeVar const &calcResult)
 
 Time (long millis, uint secs, uint mins=0, uint hours=0)
 convenience constructor to build an internal Lumiera Time value from the usual parts of an sexagesimal time specification.
 
 operator std::string () const
 
TimeVar operator+ (TimeValue const &tval) const
 convenience start for time calculations
 
TimeVar operator- (TimeValue const &tval) const
 
TimeVar operator- () const
 
- 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
 

Private Member Functions

Timeoperator= (Time const)
 direct assignment prohibited
 
 Time (int)
 suppress possible direct conversions
 

Additional Inherited Members

- Static Public Member Functions inherited from TimeValue
static TimeValue buildRaw_ (raw_time_64)
 
- Protected Member Functions inherited from TimeValue
TimeValueoperator= (TimeValue const &o)
 Assigning of time values is not allowed, but derived classed might allow that.
 
 TimeValue (TimeValue const &origin, TimeValue const &target)
 
- 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
 

Constructor & Destructor Documentation

◆ Time() [1/6]

Time ( int  )
private

suppress possible direct conversions

◆ Time() [2/6]

Time ( TimeValue const &  val = TimeValue(0))
inlineexplicit

Definition at line 322 of file timevalue.hpp.

◆ Time() [3/6]

Time ( FSecs const &  fractionalSeconds)
explicit

convenience constructor to build an Time value from a fraction of seconds, given as rational number.

An example would be to the time unit of a framerate.

Definition at line 158 of file time.cpp.

◆ Time() [4/6]

Time ( Time const &  )
default

◆ Time() [5/6]

Time ( TimeVar const &  calcResult)
inline

Definition at line 331 of file timevalue.hpp.

◆ Time() [6/6]

Time ( long  millis,
uint  secs,
uint  mins = 0,
uint  hours = 0 
)

convenience constructor to build an internal Lumiera Time value from the usual parts of an sexagesimal time specification.

Arbitrary integral values are acceptable and will be summed up accordingly. The minute and hour part can be omitted.

Warning
internal Lumiera time values refer to an implementation dependent time origin/scale. The given value will be used as-is, without any further adjustments.

Definition at line 145 of file time.cpp.

Member Function Documentation

◆ operator=()

Time & operator= ( Time const  )
private

direct assignment prohibited

◆ operator std::string()

operator std::string ( ) const
explicit

diagnostics

◆ operator+()

TimeVar operator+ ( TimeValue const &  tval) const
inline

convenience start for time calculations

Definition at line 345 of file timevalue.hpp.

◆ operator-() [1/2]

TimeVar operator- ( TimeValue const &  tval) const
inline

Definition at line 346 of file timevalue.hpp.

◆ operator-() [2/2]

TimeVar operator- ( ) const
inline

Definition at line 347 of file timevalue.hpp.

Member Data Documentation

◆ MAX

◆ MIN

◆ ZERO

const Time ZERO
static

Definition at line 316 of file timevalue.hpp.

Referenced by TimeCode::TimeCode(), ZoomWindow::ZoomWindow(), ZoomWindow::ZoomWindow(), lib::time::test::anonymous_namespace{time-control-test.cpp}::____verify_notification(), JobPlanningPipeline_test::accessTopLevelJobTicket(), TimeGrid::build(), NodeLink_test::build_connected_nodes(), Builder< TimeSpan, Duration >::buildChangedValue(), MObjectRef_test::checkBuildMObjectRef(), TimeBasics_test::checkComponentBreakdown(), TimeValue_test::checkTimeHash(), LoadController::classifyTimeHorizon(), TimingConstraints_test::define_basicTimingConstraints(), JobPlanningPipeline_test::exploreJobTickets(), DummySessionConnection::fabricateSeq1(), NodeFeed_test::feedParam(), TimeCode::field_motion_notify_event(), TestChainLoad< maxFan >::ScheduleCtx::fillAdaptedSchedule(), SchedulerLoadControl_test::indicateAverageLoad(), SchedulerCommutator_test::integratedWorkCycle(), TimeCode::minsec_time_from_display(), TimeControl_test::run(), MObjectInterface_test::run(), ZoomWindow_test::safeguard_poisonousMetric(), ZoomWindow_test::safeguard_toxic_zoomFactor(), ZoomWindow_test::safeguard_verySmall(), LoadController::scatteredDelayTime(), SchedulerLoadControl_test::scatteredReCheck(), TimeCode::smpte_time_from_display(), NodeDevel_test::testRand_buildFilterNode(), NodeDevel_test::testRand_buildMixNode(), NodeDevel_test::testRand_simpleUsage(), TimeValue_test::verify_fractionalOffset(), MockSupport_test::verify_MockPrerequisites(), MockSupport_test::verify_MockSegmentation(), NodeBase_test::verify_NodeStructure(), SchedulerCommutator_test::verify_postChain(), Timings_test::verify_simpleFrameStep(), TimeControl_test::verifyBasics(), and RealClock::wasRecently().

◆ ANYTIME

◆ NEVER

+ Inheritance diagram for Time:
+ Collaboration diagram for Time:

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