47 sec = seconds + 60 * (minutes + 60 * (hours + 24 * (days)));
53 return static_cast<int>(60.0 * minutes);
58 if (this->
sec == time.
sec) {
67 if (this->
sec < time.
sec) {
76 if (this->
sec <= time.
sec) {
106 return (
sec / 86400);
111 return ((
sec / 3600) % 24);
116 return ((
sec / 60) % 60);
126 return (
sec % 86400);
144 if (0 <= h && h < 24) {
152 if (0 <= m && m < 60) {
160 if (0 <= s && s < 60) {
int convert(int days, int hours, int minutes, int seconds)
converts days, hours and minutes to seconds
void operator-=(const AGTime &time)
void addDays(int days)
addition of days to the current moment
bool operator<=(const AGTime &time)
void addHours(int hours)
addition of hours to the current moment
bool operator<(const AGTime &time)
bool operator==(const AGTime &time)
AGTime operator+(const AGTime &time)
void operator+=(const AGTime &time)
void addMinutes(int min)
addition of minutes to the current moment
void addSeconds(int sec)
addition of seconds to the current moment
int getSecondsInCurrentDay()
int getSecondsOf(double minutes)
computes the number of seconds in the given minutes
int getTime()
: returns the number of seconds from the beginning of the first day of simulation this includes ...
void setTime(int sec)
: sets the time from the beginning of the first day of simulation in seconds