class CTimeSpan

A CTimeSpan object represents a relative time span. The CTimeSpan class incorporates the ANSI time_t data type and its associated run-time functions. These functions convert seconds to various combinations of days, hours, minutes, and seconds.

A CTimeSpan object keeps time in seconds. Because the CTimeSpan object is stored as a signed number in 4 bytes, the maximum allowed span is ± 68 years, approximately.

A companion class, CTime, represents an absolute time. A CTimeSpan is the difference between two CTimes.

#include <afx.h>

See Also

Run-time functions: asctime, ftime, gmtime, localtime, strftime, time

Derivation

The CTime and CTimeSpan classes are not designed for derivation. Because there are no virtual functions, the size of both CTime and CTimeSpan objects is exactly 4 bytes. Most member functions are inline.