34#include <NDEVR/Time.h>
35#include <NDEVR/LibAssert.h>
36#include <NDEVR/ObjectInfo.h>
112 template<
class t_type = fltp08>
225 static const bool Primitive =
true;
227 static const bool Unsigned =
false;
228 static const bool Float =
true;
229 static const bool Integer =
false;
230 static const bool Number =
true;
234 static const bool Boolean =
false;
237 NDEVR_BASE_API TimeSpan operator-(
const Time& time,
const Time& value);
239 NDEVR_BASE_API Time operator+(
const Time& time,
const TimeSpan& value);
240 NDEVR_BASE_API Time operator-(
const Time& time,
const TimeSpan& value);
241 NDEVR_BASE_API Time& operator+=(Time& time,
const TimeSpan& value);
242 NDEVR_BASE_API Time& operator-=(Time& time,
const TimeSpan& value);
245 return value >=
TimeSpan(0) ? value : -value;
#define lib_assert(expression, message)
Asserts some logic in the code. Disabled in non debug mode by default. Can be re-enabled in release u...
Definition LibAssert.h:70
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Pointer.hpp:62
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
static constexpr uint08 SECOND
Definition Time.h:84
constexpr uint08 getNanoSeconds() const
Gets the timestamp in nanoseconds.
Definition Time.h:185
static constexpr uint08 MINUTE
Definition Time.h:85
static constexpr uint08 MILLISECOND
Definition Time.h:83
constexpr sint08 elapsedNanoseconds() const
Definition TimeSpan.h:100
TimeSpan(const Time &start, const Time &end)
Definition TimeSpan.h:66
constexpr bool operator<=(const TimeSpan &other) const
Definition TimeSpan.h:148
constexpr TimeSpan(const Time &start, const fltp08 &elapsed_seconds)
Definition TimeSpan.h:76
constexpr bool operator==(const TimeSpan &time) const
Definition TimeSpan.h:128
constexpr TimeSpan(const uint08 elapsed_nano_seconds)
Definition TimeSpan.h:58
constexpr TimeSpan operator/(const fltp08 &den) const
Definition TimeSpan.h:161
constexpr TimeSpan()
Definition TimeSpan.h:42
NDEVR_BASE_API bool contains(const Time &time) const
Definition TimeSpan.cpp:14
NDEVR_BASE_API String getTimeString(const String &format_string) const
Definition TimeSpan.cpp:18
constexpr void setEndTime(Time time)
Definition TimeSpan.h:92
constexpr fltp08 elapsedSeconds() const
Definition TimeSpan.h:105
constexpr TimeSpan operator-(const TimeSpan &other) const
Definition TimeSpan.h:193
constexpr TimeSpan & operator+=(const TimeSpan &other)
Definition TimeSpan.h:188
constexpr TimeSpan & operator*=(const sint08 &mult)
Definition TimeSpan.h:174
constexpr t_type elapsedMilliseconds() const
Definition TimeSpan.h:113
constexpr bool operator<(const TimeSpan &other) const
Definition TimeSpan.h:144
constexpr TimeSpan(uint04 elapsed_nano_seconds)
Definition TimeSpan.h:54
constexpr fltp08 elapsedMinutes() const
Definition TimeSpan.h:120
Time m_start_time
Definition TimeSpan.h:207
constexpr TimeSpan(sint04 elapsed_nano_seconds)
Definition TimeSpan.h:46
NDEVR_BASE_API Time endTime() const
Definition TimeSpan.cpp:182
constexpr TimeSpan operator+(const TimeSpan &other) const
Definition TimeSpan.h:184
constexpr bool operator!=(const TimeSpan &time) const
Definition TimeSpan.h:132
constexpr TimeSpan operator*(const fltp08 &mult) const
Definition TimeSpan.h:170
constexpr TimeSpan & operator*=(const fltp08 &mult)
Definition TimeSpan.h:179
sint08 m_elapsed_time
Definition TimeSpan.h:208
constexpr TimeSpan(const Time &start, const sint08 &elapsed_nano_seconds)
Definition TimeSpan.h:71
constexpr bool operator>=(const TimeSpan &other) const
Definition TimeSpan.h:140
constexpr Time startTime() const
Definition TimeSpan.h:84
NDEVR_BASE_API sint08 elapsedDays() const
Definition TimeSpan.cpp:186
constexpr TimeSpan operator/(const sint08 &den) const
Definition TimeSpan.h:157
constexpr TimeSpan operator*(const sint08 &mult) const
Definition TimeSpan.h:166
constexpr TimeSpan & operator-=(const TimeSpan &other)
Definition TimeSpan.h:201
constexpr TimeSpan operator-() const
Definition TimeSpan.h:197
constexpr bool operator>(const TimeSpan &other) const
Definition TimeSpan.h:136
constexpr fltp08 operator/(const TimeSpan &time_2) const
Definition TimeSpan.h:153
constexpr void setStartTime(Time time)
Definition TimeSpan.h:88
constexpr TimeSpan(const fltp08 elapsed_seconds)
Definition TimeSpan.h:62
constexpr TimeSpan(const sint08 elapsed_nano_seconds)
Definition TimeSpan.h:50
NDEVR_BASE_API fltp08 elapsedPercent(Time time, bool clip_time) const
Definition TimeSpan.cpp:6
NDEVR_BASE_API sint08 elapsedMonths() const
Definition TimeSpan.cpp:195
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:76
int64_t sint08
-Defines an alias representing an 8 byte, signed integer -Can represent exact integer values -9223372...
Definition BaseValues.hpp:86
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
constexpr Angle< t_angle_type > abs(const Angle< t_angle_type > &value)
Definition AngleFunctions.h:750
constexpr bool isNaN(const t_type &value)
Query if 'value' is valid or invalid.
Definition BaseFunctions.hpp:200
constexpr Vector< t_dims, Angle< t_angle_type > > operator%(const Vector< t_dims, Angle< t_angle_type > > &vec_a, const Vector< t_dims, Angle< t_angle_type > > &vec_b)
Definition AngleFunctions.h:734
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition BaseValues.hpp:272
static constexpr ObjectInfo< TimeSpan, false, false > VectorSub()
Definition TimeSpan.h:235
Information about the object.
Definition ObjectInfo.h:56