roo_quantity
API Documentation for roo_quantity
Loading...
Searching...
No Matches
roo_quantity::Time Class Reference

Representation of elapsed, internally stored as floating-point seconds. More...

#include <time.h>

Public Member Functions

 Time ()
 Creates a time object representing an 'unknown' time.
 
 Time (const roo_time::Duration &duration)
 
float inSeconds () const
 Returns the time in seconds.
 
float inMilliseconds () const
 Returns the time in milliseconds.
 
float inMicroseconds () const
 Returns the time in microseconds.
 
float inNanoseconds () const
 Returns the time in nanoseconds.
 
bool isUnknown () const
 Returns whether the object represents an unknown time.
 
bool operator< (const Time &other) const
 
bool operator== (const Time &other) const
 
bool operator> (const Time &other) const
 
bool operator<= (const Time &other) const
 
bool operator>= (const Time &other) const
 
bool operator!= (const Time &other) const
 
Timeoperator+= (const Time &other)
 
Timeoperator-= (const Time &other)
 
Timeoperator*= (float multi)
 
Timeoperator/= (float div)
 

Friends

Time UnknownTime ()
 Returns a time object representing an unknown time.
 
Time TimeInSeconds (float)
 Returns a time object equivalent to the specified time expressed in seconds.
 

Detailed Description

Representation of elapsed, internally stored as floating-point seconds.

Definition at line 22 of file time.h.

Constructor & Destructor Documentation

◆ Time() [1/2]

roo_quantity::Time::Time ( )
inline

Creates a time object representing an 'unknown' time.

Definition at line 25 of file time.h.

◆ Time() [2/2]

roo_quantity::Time::Time ( const roo_time::Duration &  duration)
inline

Definition at line 27 of file time.h.

Member Function Documentation

◆ inMicroseconds()

float roo_quantity::Time::inMicroseconds ( ) const
inline

Returns the time in microseconds.

Definition at line 36 of file time.h.

◆ inMilliseconds()

float roo_quantity::Time::inMilliseconds ( ) const
inline

Returns the time in milliseconds.

Definition at line 33 of file time.h.

◆ inNanoseconds()

float roo_quantity::Time::inNanoseconds ( ) const
inline

Returns the time in nanoseconds.

Definition at line 39 of file time.h.

◆ inSeconds()

◆ isUnknown()

bool roo_quantity::Time::isUnknown ( ) const
inline

Returns whether the object represents an unknown time.

Definition at line 42 of file time.h.

◆ operator!=()

bool roo_quantity::Time::operator!= ( const Time other) const
inline

Definition at line 54 of file time.h.

◆ operator*=()

Time & roo_quantity::Time::operator*= ( float  multi)
inline

Definition at line 66 of file time.h.

◆ operator+=()

Time & roo_quantity::Time::operator+= ( const Time other)
inline

Definition at line 56 of file time.h.

References inSeconds().

◆ operator-=()

Time & roo_quantity::Time::operator-= ( const Time other)
inline

Definition at line 61 of file time.h.

References inSeconds().

◆ operator/=()

Time & roo_quantity::Time::operator/= ( float  div)
inline

Definition at line 71 of file time.h.

◆ operator<()

bool roo_quantity::Time::operator< ( const Time other) const
inline

Definition at line 44 of file time.h.

◆ operator<=()

bool roo_quantity::Time::operator<= ( const Time other) const
inline

Definition at line 50 of file time.h.

◆ operator==()

bool roo_quantity::Time::operator== ( const Time other) const
inline

Definition at line 46 of file time.h.

◆ operator>()

bool roo_quantity::Time::operator> ( const Time other) const
inline

Definition at line 48 of file time.h.

◆ operator>=()

bool roo_quantity::Time::operator>= ( const Time other) const
inline

Definition at line 52 of file time.h.

Friends And Related Symbol Documentation

◆ TimeInSeconds

Time TimeInSeconds ( float  time)
friend

Returns a time object equivalent to the specified time expressed in seconds.

Definition at line 111 of file time.h.

◆ UnknownTime

Time UnknownTime ( )
friend

Returns a time object representing an unknown time.

Definition at line 99 of file time.h.


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