3#include <Foundation/Basics.h>
12 return static_cast<float>(m_fTime);
17 return m_fTime * 1000000000.0;
22 return m_fTime * 1000000.0;
27 return m_fTime * 1000.0;
37 return m_fTime / 60.0;
42 return m_fTime / (60.0 * 60.0);
47 m_fTime -= other.m_fTime;
52 m_fTime += other.m_fTime;
65constexpr PL_ALWAYS_INLINE
plTime plTime::operator-()
const
72 return plTime(m_fTime - other.m_fTime);
77 return plTime(m_fTime + other.m_fTime);
80constexpr PL_ALWAYS_INLINE
plTime operator*(
plTime t,
double f)
85constexpr PL_ALWAYS_INLINE
plTime operator*(
double f,
plTime t)
95constexpr PL_ALWAYS_INLINE
plTime operator/(
plTime t,
double f)
100constexpr PL_ALWAYS_INLINE
plTime operator/(
double f,
plTime t)
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12
constexpr plTime operator-(const plTime &other) const
Returns the difference: "this instance - other".
Definition Time_inl.h:70
constexpr double GetHours() const
Returns the hours value.
Definition Time_inl.h:40
PL_ALWAYS_INLINE constexpr plTime()=default
The default constructor sets the time to zero.
PL_ALWAYS_INLINE static constexpr plTime MakeFromSeconds(double fSeconds)
Creates an instance of plTime that was initialized from seconds.
Definition Time.h:30
constexpr void operator/=(double fFactor)
Divides the time by the given factor.
Definition Time_inl.h:60
constexpr double GetMinutes() const
Returns the minutes value.
Definition Time_inl.h:35
constexpr void operator-=(const plTime &other)
Subtracts the time value of "other" from this instances value.
Definition Time_inl.h:45
constexpr plTime operator+(const plTime &other) const
Returns the sum: "this instance + other".
Definition Time_inl.h:75
constexpr float AsFloatInSeconds() const
Returns the time as a float value (in seconds).
Definition Time_inl.h:10
constexpr void operator+=(const plTime &other)
Adds the time value of "other" to this instances value.
Definition Time_inl.h:50
constexpr double GetNanoseconds() const
Returns the nanoseconds value.
Definition Time_inl.h:15
constexpr double GetMicroseconds() const
Returns the microseconds value.
Definition Time_inl.h:20
constexpr double GetSeconds() const
Returns the seconds value.
Definition Time_inl.h:30
constexpr void operator*=(double fFactor)
Multiplies the time by the given factor.
Definition Time_inl.h:55
constexpr double GetMilliseconds() const
Returns the milliseconds value.
Definition Time_inl.h:25