Microsoft Foundation Classes (mfc.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CTimeSpan::operators <<, >>
◄CTimeSpan► ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
friend CDumpContext& operator <<( CDumpContext& dc, CTimeSpan timeSpan );
friend CArchive& operator <<( CArchive& ar, CTimeSpan timeSpan );
friend CArchive& operator >>( CArchive& ar, CTimeSpan& rtimeSpan );
Remarks
The CTimeSpan insert (<<) operator supports diagnostic dumping and
storing to an archive. The extract (>>) operator supports loading from
an archive.
When you send a CTimeSpan object to the dump context, the value is
displayed in a human-readable format that shows days, hours, minutes,
and seconds.
Example
CTimeSpan ts( 3, 1, 5, 12 ); // 3 days, 1 hour, 5 min, and 12 sec
#ifdef _DEBUG
afxDump << ts << "\n";
#endif
// prints 'CTimeSpan(3 days, 1 hours, 5 minutes and 12 seconds)'
extern CArchive ar;
if( ar.IsLoading( ))
ar >> ts;
else
ar << ts;
-♦-