34 #ifndef PTLIB_TIMEINTERVAL_H
35 #define PTLIB_TIMEINTERVAL_H
199 PInt64 milliseconds = 0,
388 PInt64 m_milliseconds;
393 #include "msos/ptlib/timeint.h"
395 #include "unix/ptlib/timeint.h"
399 #endif // PTLIB_TIMEINTERVAL_H
Definition: timeint.h:127
PTimeInterval operator-() const
Unary minus, get negative of time interval.
PTimeInterval operator+(const PTimeInterval &interval) const
Add the two time intervals yielding a third time interval.
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:55
PTimeInterval operator*(int factor) const
Multiply the time interval by a factor yielding a third time interval.
virtual void ReadFrom(istream &strm)
Input the time interval from the I/O stream.
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:1184
bool operator<=(const PTimeInterval &interval) const
Compare to the two time intervals.
virtual Comparison Compare(const PObject &obj) const
Rank the two time intervals.
PTimeInterval & operator-=(const PTimeInterval &interval)
Subtract the second time interval from the first time interval.
bool operator!=(const PTimeInterval &interval) const
Compare to the two time intervals.
Formats
Definition: timeint.h:126
virtual PInt64 GetMilliSeconds() const
Get the number of milliseconds for the time interval.
bool operator==(const PTimeInterval &interval) const
Compare to the two time intervals.
PTimeInterval(PInt64 millisecs=0)
Create a new time interval object.
PTimeInterval & operator/=(int factor)
Divide the time interval by a factor.
virtual void SetMilliSeconds(PInt64 msecs)
Set the number of milliseconds for the time interval.
PTimeInterval & operator+=(const PTimeInterval &interval)
Add the second time interval to the first time interval.
The character string class.
Definition: pstring.h:108
Definition: timeint.h:129
virtual void PrintOn(ostream &strm) const
Output the time interval to the I/O stream.
virtual void SetInterval(PInt64 milliseconds=0, long seconds=0, long minutes=0, long hours=0, int days=0)
Set the value of the time interval.
bool operator>(const PTimeInterval &interval) const
Compare to the two time intervals.
Definition: timeint.h:128
DWORD GetInterval() const
Get the number of milliseconds for the time interval.
long GetMinutes() const
Get the number of whole minutes for the time interval.
bool operator>=(const PTimeInterval &interval) const
Compare to the two time intervals.
long GetSeconds() const
Get the number of whole seconds for the time interval.
bool operator<(const PTimeInterval &interval) const
Compare to the two time intervals.
int operator/(const PTimeInterval &smaller) const
Divide the time interval by another interval yielding a count.
int GetDays() const
Get the number of whole days for the time interval.
int GetHours() const
Get the number of whole hours for the time interval.
PObject * Clone() const
Create a new copy of the time interval.
PTimeInterval & operator*=(int factor)
Multiply the time interval by a factor.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PString AsString(int decimals=3, Formats format=NormalFormat, int width=1) const