-
Notifications
You must be signed in to change notification settings - Fork 11
Timespan class documentation
Jeremy Dumais edited this page Mar 6, 2020
·
1 revision
timespan(int days, int hours=0, int minutes=0, int seconds=0);int get_days();
int get_hours();
int get_minutes();
int get_seconds();
int get_total_hours();
int get_total_minutes();
int get_total_seconds();| Operator | Quick description | Example |
|---|---|---|
| < | Less operator | timespan ts1(3, 2, 1, 0); timespan ts2(3, 2, 0, 0); assert(ts2 < ts1); |
| <= | Less equal operator | assert(ts2 <= ts1); ts1 = timespan(4, 3, 2, 1); ts2 = timespan(4, 3, 2, 1); |
| > | Greater operator | timespan ts1(3, 2, 1, 0); timespan ts2(3, 2, 0, 0); assert(ts1 > ts2); |
| >= | Greater equal operator | ts1 = timespan(4, 3, 2, 1); ts2 = timespan(4, 3, 2, 1); assert(ts2 >= ts1); |
| == | Equality operator | assert(timespan(1, 2, 3, 4) == timespan(1, 2, 3, 4)); |
| != | Inequality operator | assert(timespan(1, 2, 3, 4) != timespan(1, 2, 3, 3)); |