Compartir a través de


CTimeSpan::GetHours

Returns a value that represents the number of hours in the current day (–23 through 23).

LONG GetHours( ) const throw( );

Return Value

Returns the number of hours in the current day. The range is –23 through 23.

Example

CTimeSpan ts(3, 1, 5, 12); // 3 days, 1 hour, 5 min, and 12 sec
ATLASSERT(ts.GetHours() == 1);
ATLASSERT(ts.GetMinutes() == 5);
ATLASSERT(ts.GetSeconds() == 12);   

Requirements

Header: atltime.h

See Also

Concepts

CTimeSpan Class

CTimeSpan Members

Hierarchy Chart