티스토리 뷰
CTimeSpan::CTimeSpan
CTimeSpan( );
CTimeSpan( const CTimeSpan& timeSpanSrc );
CTimeSpan( time_t time );
CTimeSpan( LONG lDays, int nHours, int nMins, int nSecs );
Parameters
timeSpanSrc
A CTimeSpan object that already exists.
time
A time_t time value.
lDays, nHours, nMins, nSecs
Days, hours, minutes, and seconds, respectively.
Remarks
All these constructors create a new CTimeSpan object initialized with the specified relative time. Each constructor is described below:
- CTimeSpan( ); Constructs an uninitialized CTimeSpan
object.
- CTimeSpan( const CTimeSpan& ); Constructs a CTimeSpan
object from another CTimeSpan value.
- CTimeSpan( time_t ); Constructs a CTimeSpan object from a
time_t type. This value should be the difference between two absolute
time_t values.
- CTimeSpan( LONG, int, int, int ); Constructs a
CTimeSpan object from components with each component constrained to the
following ranges:
Component Range lDays 0–25,000 (approximately) nHours 0–23 nMins 0–59 nSecs 0–59
Note that the Debug version of the Microsoft Foundation Class Library asserts if one or more of the time-day components is out of range. It is your responsibility to validate the arguments prior to calling.
Example
// example for CTimeSpan::CTimeSpan
CTimeSpan ts1; // Uninitialized time value
CTimeSpan ts2a( ts1 ); // Copy constructor
CTimeSpan ts2b = ts1; // Copy constructor again
CTimeSpan ts3( 100 ); // 100 seconds
CTimeSpan ts4( 0, 1, 5, 12 ); // 1 hour, 5 minutes, and 12 seconds
CTimespan Overview | Class Members | Hierarchy Chart
CTimeSpan Class Members
Construction
CTimeSpan | Constructs CTimeSpan objects in various ways. |
Extraction
GetDays | Returns the number of complete days in this CTimeSpan. |
GetHours | Returns the number of hours in the current day (–23 through 23). |
GetTotalHours | Returns the total number of complete hours in this CTimeSpan. |
GetMinutes | Returns the number of minutes in the current hour (–59 through 59). |
GetTotalMinutes | Returns the total number of complete minutes in this CTimeSpan. |
GetSeconds | Returns the number of seconds in the current minute (–59 through 59). |
GetTotalSeconds | Returns the total number of complete seconds in this CTimeSpan. |
Conversion
Format | Converts a CTimeSpan into a formatted string. |
Operators
operator = | Assigns new time-span values. |
operator + – | Adds and subtracts CTimeSpan objects. |
operator += –= | Adds and subtracts a CTimeSpan object to and from this CTimeSpan. |
operator == < etc. | Compares two relative time values. |
Archive/Dump
operator << | Outputs a CTimeSpan object to CArchive or CDumpContext. |
operator >> | Inputs a CTimeSpan object from CArchive. |
- Total
- Today
- Yesterday
- java-개발 환경 설정하기
- REST API
- MainActor
- jsp 오픈 소스
- 제품 등록
- 표현 언어(expression language)
- docker
- java.sql
- 특정 문자를 기준으로 자르기
- In App Purchase
- jstl(java standard tag library)
- 인텔리제이(intellij)
- 문자 자르기
- java web-mvc
- 진수 변환
- 스프링 프레임워크(spring framework)
- 스프링 프레임워크(spring framewordk)
- System.Diagnostics
- error-java
- 스프링 시큐리티(spring security)-http basic 인증
- React
- java 키워드 정리
- 메이븐(maven)
- .submit()
- 람다식(lambda expression)
- system.io
- 스프링 시큐리티(spring security)
- jstl(java standard tag library)-core
- nl2br
- await
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |