#include <Time.hpp>
Public Types | |
| using | ImplType = boost::posix_time::time_duration |
| impl type is boost::posix_time::time_duration | |
Public Member Functions | |
| int | days () const |
| whole number of days | |
| int | hours () const |
| whole number of hours remaining after days | |
| int | minutes () const |
| whole number of minutes remaining after hours | |
| bool | operator!= (const Time &other) const |
| non-equality operator | |
| Time | operator* (double mult) const |
| multiplication operator | |
| Time | operator+ (const Time &time) const |
| addition operator | |
| Time & | operator+= (const Time &time) |
| assignment by addition operator | |
| Time | operator- (const Time &time) const |
| difference operator | |
| Time & | operator-= (const Time &time) |
| assignment by difference operator | |
| Time | operator/ (double div) const |
| division operator | |
| bool | operator< (const Time &rhs) const |
| less than operator | |
| bool | operator<= (const Time &rhs) const |
| less than equals operator | |
| Time & | operator= (const Time &other) |
| assignment operator | |
| bool | operator== (const Time &other) const |
| equality operator | |
| bool | operator> (const Time &rhs) const |
| greater than operator | |
| bool | operator>= (const Time &rhs) const |
| greater than equals operator | |
| int | seconds () const |
| whole number of seconds remaining after minutes | |
| Time () | |
| default constructor | |
| Time (const ImplType &implType) | |
| from impl | |
| Time (const std::string &string) | |
| constructor from string | |
| Time (const Time &other) | |
| copy constructor | |
| Time (double fracDays) | |
| Time from number of days, fractional values ok. | |
| Time (int days, int hours, int minutes=0, int seconds=0) | |
| Time from days, hours, minutes, seconds. | |
| Time (tm t_tm) | |
| Time from std tm structure. | |
| std::string | toString () const |
| Convert to a string. | |
| double | totalDays () const |
| entire time in days | |
| double | totalHours () const |
| entire time in hours | |
| double | totalMinutes () const |
| entire time in minutes | |
| int | totalSeconds () const |
| entire time in seconds | |
Static Public Member Functions | |
| static Time | currentTime () |
| get current local time of day | |
| static Time | currentTimeUTC () |
| get the current UTC time of day | |
Time is a relative unit of time, resolution to the second Time is simple wrapper around boost::posix_time::time_duration Internally totalSeconds is the primary definition of time (i.e.
it does not matter how time is divided into hours, minutes, seconds)
| using openstudio::Time::ImplType = boost::posix_time::time_duration |
impl type is boost::posix_time::time_duration
| openstudio::Time::Time | ( | ) |
default constructor
| openstudio::Time::Time | ( | const ImplType & | implType | ) |
from impl
| openstudio::Time::Time | ( | double | fracDays | ) |
Time from number of days, fractional values ok.
Time from days, hours, minutes, seconds.
| openstudio::Time::Time | ( | tm | t_tm | ) |
Time from std tm structure.
| openstudio::Time::Time | ( | const std::string & | string | ) |
constructor from string
| openstudio::Time::Time | ( | const Time & | other | ) |
copy constructor
|
static |
get current local time of day
|
static |
get the current UTC time of day
| int openstudio::Time::days | ( | ) | const |
whole number of days
| int openstudio::Time::hours | ( | ) | const |
whole number of hours remaining after days
| int openstudio::Time::minutes | ( | ) | const |
whole number of minutes remaining after hours
| bool openstudio::Time::operator!= | ( | const Time & | other | ) | const |
non-equality operator
| Time openstudio::Time::operator* | ( | double | mult | ) | const |
multiplication operator
| Time openstudio::Time::operator/ | ( | double | div | ) | const |
division operator
| bool openstudio::Time::operator< | ( | const Time & | rhs | ) | const |
less than operator
| bool openstudio::Time::operator<= | ( | const Time & | rhs | ) | const |
less than equals operator
| bool openstudio::Time::operator== | ( | const Time & | other | ) | const |
equality operator
| bool openstudio::Time::operator> | ( | const Time & | rhs | ) | const |
greater than operator
| bool openstudio::Time::operator>= | ( | const Time & | rhs | ) | const |
greater than equals operator
| int openstudio::Time::seconds | ( | ) | const |
whole number of seconds remaining after minutes
| std::string openstudio::Time::toString | ( | ) | const |
Convert to a string.
| double openstudio::Time::totalDays | ( | ) | const |
entire time in days
| double openstudio::Time::totalHours | ( | ) | const |
entire time in hours
| double openstudio::Time::totalMinutes | ( | ) | const |
entire time in minutes
| int openstudio::Time::totalSeconds | ( | ) | const |
entire time in seconds