Titus Information Systems, Inc.

Standard Library
TTime Class

This class is inherited from the TPresent class.  An instance of this class is used by the programmer to set, access, add to, subtract from, and otherwise maintain time of day.  The public member functions are as follows:

TTime::TTime()
This is the default constructor.  It sets the internal time to the current time.
TTime::TTime(CTime Time)
TTime::TTime(int Hour, int Minute, int Second)
These constructors set the internal time to the specified time.
int TTime::GetTime()
int TTime::GetTime(int*Hour, int*Minute, int*Second)
int TTime::GetTime(CString&Text)
int TTime::GetTime(CTime&Text)
int TTime::GetHour()
int TTime::GetMinute()
int TTime::GetSecond()
These member functions return the internal time in the format requested.  The CString format is hh:mm:ss.  The TTime::GetTime() functions also return ThisTime.i.
int TTime::SetTime()
int TTime::SetTime(TTime Time)
int TTime::SetTime(CTime Time)
int TTime::SetTime(CString Time)
int TTime::SetTime(int Time)
int TTime::SetTime(int Hour, int Minute, int Second)
TTime& TTime::operator=(TTime Time)
TTime& TTime::operator=(CTime Time)
These member functions set the internal time from the format specified.  The version with no arguments sets the internal time to the current time. The CString format must be specified as hh:mm:ss.  The TTime::SetTime() functions also return ThisTime.i after it has been set.
int TTime::AddTime(TTime Time)
int TTime::AddTime(int Hour, int Minute, int Second)
TTime& TTime::operator+(TTime Time)
int TTime::SubtractTime(TTime Time)
int TTime::SubtractTime(int Hour, int Minute, int Second)
TTime& TTime::operator-(TTime Time)
These member functions adjust the internal time by that specified.  The TTime::AddTime() and TTime::SubtractTime() functions also return ThisTime.i after it has been set.
BOOL TTime::operator==(TTime& Time)
BOOL TTime::operator!=(TTime& Time)
BOOL TTime::operator>(TTime& Time)
BOOL TTime::operator<(TTime& Time)
BOOL TTime::operator>=(TTime& Time)
BOOL TTime::operator<=(TTime& Time)
These member functions compare the internal time with that specified.  They return TRUE or FALSE based on the success or failure of the requested comparison.
union ThisTimeDef {int i; BYTE p[4];} ThisTime
This member structure may be inherited.  It stores the internal time of day.  The three low-order bytes of ThisTime.p represent the second, minute, and hour respectively.  The high-order byte of ThisTime.p is always zero.  ThisTime.i may be compared with that of another TTime class as a four-byte integer.


[ CBinaryFile | TCommandLineInfo | CCommaFile | TDateCtrl | CDDE | CDdeClient | CDdeServer ]
[ CDirectoryLocator | CDirectoryDialog | CDirectoryFind | CDirectoryNew | CFileCopy | TFrameWnd ]
[ InterfaceExcel | CMaintFn | CPrintFile | CProcDialog | TPrintDialog | CProcPropertyPage ]
[ CProgress | CRegistry | CSDisCreate | CSDisFile | CSDisPage | CSDisView | CTableFile ]
[ CTaskIcon | TPresent | TDate | TDateTime | CTransferData | TWinApp | CXlTable ]

[ Stand-alone Programs | Standard Library | Conversion Functions | Utility Functions | COBOL Functions ]
[ Windows NT Library | COBOL Library | COBOL Interface | Command Prompt Abbreviations | Purchase Instructions ]

[ Home | Areas of Expertise | "We Do Windows" | Clients and Projects | Software Samples | Package Software Available ]
[ Contact Information | Business Software Philosophy | Church Software Philosophy ]
All contents of this web site are Copyright © Titus Information Systems, Inc., Phoenix, Arizona, U.S.A.