11---
2- title : " CFileTimeSpan Class "
3- ms.date : " 10/18/2018 "
2+ title : " CFileTimeSpan class "
3+ ms.date : " 01/06/2020 "
44f1_keywords : ["CFileTimeSpan", "ATLTIME/ATL::CFileTimeSpan", "ATLTIME/ATL::CFileTimeSpan::CFileTimeSpan", "ATLTIME/ATL::CFileTimeSpan::GetTimeSpan", "ATLTIME/ATL::CFileTimeSpan::SetTimeSpan"]
55helpviewer_keywords : ["shared classes, CFileTimeSpan", "CFileTimeSpan class"]
66ms.assetid : 5856fb39-9c82-4027-8ccf-8760890491ec
77---
8- # CFileTimeSpan Class
8+ # CFileTimeSpan class
99
1010This class provides methods for managing relative date and time values associated with a file.
1111
1212## Syntax
1313
14- ```
14+ ``` cpp
1515class CFileTimeSpan
1616```
1717
1818## Members
1919
20- ### Public Constructors
20+ ### Public constructors
2121
2222|Name|Description|
2323|----------|-----------------|
2424|[CFileTimeSpan::CFileTimeSpan](#cfiletimespan)|The constructor.|
2525
26- ### Public Methods
26+ ### Public methods
2727
2828|Name|Description|
2929|----------|-----------------|
3030|[CFileTimeSpan::GetTimeSpan](#gettimespan)|Call this method to retrieve the time span from the `CFileTimeSpan` object.|
3131|[CFileTimeSpan::SetTimeSpan](#settimespan)|Call this method to set the time span of the `CFileTimeSpan` object.|
3232
33- ### Public Operators
33+ ### Public operators
3434
3535|Name|Description|
3636|----------|-----------------|
@@ -48,7 +48,7 @@ class CFileTimeSpan
4848
4949## Remarks
5050
51- This class provides methods for managing relative periods of time often encountered when performing operations concerning when a file was created, last accessed or last modified. The methods of this class are frequently used in conjunction with [ CFileTime class] ( ../../atl-mfc-shared/reference/cfiletime-class.md ) objects.
51+ This class provides methods to handle relative periods of time in the units the file system uses. These units are often used in operations concerning when a file was created, last accessed, or last modified. The methods of this class are frequently used in conjunction with [CFileTime class](../../atl-mfc-shared/reference/cfiletime-class.md) objects.
5252
5353## Example
5454
@@ -58,243 +58,243 @@ See the example for [CFileTime::Millisecond](../../atl-mfc-shared/reference/cfil
5858
5959**Header:** atltime.h
6060
61- ## <a name =" cfiletimespan " ></a > CFileTimeSpan::CFileTimeSpan
61+ ## <a name="cfiletimespan"></a> CFileTimeSpan::CFileTimeSpan
6262
6363The constructor.
6464
65- ```
65+ ```cpp
6666CFileTimeSpan() throw();
6767CFileTimeSpan(const CFileTimeSpan& span) throw();
6868CFileTimeSpan(LONGLONG nSpan) throw();
6969```
7070
7171### Parameters
7272
73- * span* < br />
73+ * span* \
7474An existing ` CFileTimeSpan ` object.
7575
76- * nSpan* < br />
76+ * nSpan* \
7777A period of time in milliseconds.
7878
7979### Remarks
8080
8181The ` CFileTimeSpan ` object can be created using an existing ` CFileTimeSpan ` object, or expressed as a 64-bit value. The default constructor sets the time span to 0.
8282
83- ## <a name =" gettimespan " ></a > CFileTimeSpan::GetTimeSpan
83+ ## <a name =" gettimespan " ></a > CFileTimeSpan::GetTimeSpan
8484
8585Call this method to retrieve the time span from the ` CFileTimeSpan ` object.
8686
87- ```
87+ ``` cpp
8888LONGLONG GetTimeSpan () const throw();
8989```
9090
91- ### Return Value
91+ ### Return value
9292
9393Returns the time span in milliseconds.
9494
95- ## <a name =" operator_- " ></a > CFileTimeSpan::operator -
95+ ## <a name =" operator_- " ></a > CFileTimeSpan::operator -
9696
9797Performs subtraction on a ` CFileTimeSpan ` object.
9898
99- ```
99+ ``` cpp
100100CFileTimeSpan operator -(CFileTimeSpan span) const throw ();
101101```
102102
103103### Parameters
104104
105- * span* < br />
105+ * span* \
106106A ` CFileTimeSpan ` object.
107107
108- ### Return Value
108+ ### Return value
109109
110110Returns a ` CFileTimeSpan ` object representing the result of the difference between two time spans.
111111
112- ## <a name =" operator_neq " ></a > CFileTimeSpan::operator !=
112+ ## <a name =" operator_neq " ></a > CFileTimeSpan::operator !=
113113
114114Compares two ` CFileTimeSpan ` objects for inequality.
115115
116- ```
116+ ``` cpp
117117bool operator !=(CFileTimeSpan span) const throw ();
118118```
119119
120120### Parameters
121121
122- * span* < br />
122+ * span* \
123123The ` CFileTimeSpan ` object to be compared.
124124
125- ### Return Value
125+ ### Return value
126126
127- Returns TRUE if the item being compared is not equal to the ` CFileTimeSpan ` object; otherwise FALSE.
127+ Returns TRUE if the item being compared isn't equal to the ` CFileTimeSpan ` object; otherwise FALSE.
128128
129- ## <a name =" operator_add " ></a > CFileTimeSpan::operator +
129+ ## <a name =" operator_add " ></a > CFileTimeSpan::operator +
130130
131131Performs addition on a ` CFileTimeSpan ` object.
132132
133- ```
133+ ``` cpp
134134CFileTimeSpan operator +(CFileTimeSpan span) const throw ();
135135```
136136
137137### Parameters
138138
139- * span* < br />
139+ * span* \
140140A ` CFileTimeSpan ` object.
141141
142- ### Return Value
142+ ### Return value
143143
144144Returns a ` CFileTimeSpan ` object containing the sum of the two time spans.
145145
146- ## <a name =" operator_add_eq " ></a > CFileTimeSpan::operator +=
146+ ## <a name =" operator_add_eq " ></a > CFileTimeSpan::operator +=
147147
148148Performs addition on a ` CFileTimeSpan ` object and assigns the result to the current object.
149149
150- ```
150+ ``` cpp
151151CFileTimeSpan& operator +=(CFileTimeSpan span) throw ();
152152```
153153
154154### Parameters
155155
156- * span* < br />
156+ * span* \
157157A ` CFileTimeSpan ` object.
158158
159- ### Return Value
159+ ### Return value
160160
161161Returns the updated ` CFileTimeSpan ` object containing the sum of the two time spans.
162162
163- ## <a name =" operator_lt " ></a > CFileTimeSpan::operator < ;
163+ ## <a name =" operator_lt " ></a > CFileTimeSpan::operator < ;
164164
165165Compares two ` CFileTimeSpan ` objects to determine the lesser.
166166
167- ```
167+ ``` cpp
168168bool operator <(CFileTimeSpan span) const throw ();
169169```
170170
171171### Parameters
172172
173- * span* < br />
173+ * span* \
174174The ` CFileTimeSpan ` object to be compared.
175175
176- ### Return Value
176+ ### Return value
177177
178178Returns TRUE if the first object is less (that is, represents a shorter time period) than the second, otherwise FALSE.
179179
180- ## <a name =" operator_lt_eq " ></a > CFileTimeSpan::operator < ; =
180+ ## <a name =" operator_lt_eq " ></a > CFileTimeSpan::operator < ; =
181181
182182Compares two ` CFileTimeSpan ` objects to determine equality or the lesser.
183183
184- ```
184+ ``` cpp
185185bool operator <=(CFileTimeSpan span) const throw ();
186186```
187187
188188### Parameters
189189
190- * span* < br />
190+ * span* \
191191The ` CFileTimeSpan ` object to be compared.
192192
193- ### Return Value
193+ ### Return value
194194
195195Returns TRUE if the first object is less than (that is, represents a shorter time period) or equal to the second, otherwise FALSE.
196196
197- ## <a name =" operator_eq " ></a > CFileTimeSpan::operator =
197+ ## <a name =" operator_eq " ></a > CFileTimeSpan::operator =
198198
199199The assignment operator.
200200
201- ```
201+ ``` cpp
202202CFileTimeSpan& operator =(const CFileTimeSpan& span) throw ();
203203```
204204
205205### Parameters
206206
207- * span* < br />
207+ * span* \
208208A ` CFileTimeSpan ` object.
209209
210- ### Return Value
210+ ### Return value
211211
212212Returns the updated ` CFileTimeSpan ` object.
213213
214- ## <a name =" operator_-_eq " ></a > CFileTimeSpan::operator -=
214+ ## <a name =" operator_-_eq " ></a > CFileTimeSpan::operator -=
215215
216216Performs subtraction on a ` CFileTimeSpan ` object and assigns the result to the current object.
217217
218- ```
218+ ``` cpp
219219CFileTimeSpan& operator -=(CFileTimeSpan span) throw ();
220220```
221221
222222### Parameters
223223
224- * span* < br />
224+ * span* \
225225A ` CFileTimeSpan ` object.
226226
227- ### Return Value
227+ ### Return value
228228
229229Returns the updated ` CFileTimeSpan ` object.
230230
231- ## <a name =" operator_eq_eq " ></a > CFileTimeSpan::operator ==
231+ ## <a name =" operator_eq_eq " ></a > CFileTimeSpan::operator ==
232232
233233Compares two ` CFileTimeSpan ` objects for equality.
234234
235- ```
235+ ``` cpp
236236bool operator ==(CFileTimeSpan span) const throw ();
237237```
238238
239239### Parameters
240240
241- * span* < br />
241+ * span* \
242242The ` CFileTimeSpan ` object to be compared.
243243
244- ### Return Value
244+ ### Return value
245245
246246Returns TRUE if the objects are equal, otherwise FALSE.
247247
248- ## <a name =" operator_gt " ></a > CFileTimeSpan::operator > ;
248+ ## <a name =" operator_gt " ></a > CFileTimeSpan::operator > ;
249249
250250Compares two ` CFileTimeSpan ` objects to determine the larger.
251251
252- ```
252+ ``` cpp
253253bool operator >(CFileTimeSpan span) const throw ();
254254```
255255
256256### Parameters
257257
258- * span* < br />
258+ * span* \
259259The ` CFileTimeSpan ` object to be compared.
260260
261- ### Return Value
261+ ### Return value
262262
263263Returns TRUE if the first object is greater than (that is, represents a longer time period) than the second, otherwise FALSE.
264264
265- ## <a name =" operator_gt_eq " ></a > CFileTimeSpan::operator > ; =
265+ ## <a name =" operator_gt_eq " ></a > CFileTimeSpan::operator > ; =
266266
267267Compares two ` CFileTimeSpan ` objects to determine equality or the larger.
268268
269- ```
269+ ``` cpp
270270bool operator >=(CFileTimeSpan span) const throw ();
271271```
272272
273273### Parameters
274274
275- * span* < br />
275+ * span* \
276276The ` CFileTimeSpan ` object to be compared.
277277
278- ### Return Value
278+ ### Return value
279279
280280Returns TRUE if the first object is greater than (that is, represents a longer time period) or equal to the second, otherwise FALSE.
281281
282- ## <a name =" settimespan " ></a > CFileTimeSpan::SetTimeSpan
282+ ## <a name =" settimespan " ></a > CFileTimeSpan::SetTimeSpan
283283
284284Call this method to set the time span of the ` CFileTimeSpan ` object.
285285
286- ```
286+ ``` cpp
287287void SetTimeSpan (LONGLONG nSpan) throw();
288288```
289289
290290### Parameters
291291
292- * nSpan* < br />
293- The new value for the time span in milliseconds .
292+ *nSpan*\
293+ The new value for the time span in 100-nanosecond units. For more information, see [CFileTime](cfiletime-class.md) .
294294
295295## See also
296296
297- [ FILETIME] ( /windows/win32/api/minwinbase/ns-minwinbase-filetime ) < br />
298- [ CFileTime Class ] ( ../../atl-mfc-shared/reference/ cfiletime-class.md) < br />
299- [ Hierarchy Chart ] ( ../../mfc/hierarchy-chart.md ) < br />
300- [ ATL/MFC Shared Classes ] ( ../../atl-mfc-shared/atl-mfc-shared-classes.md )
297+ [FILETIME](/windows/win32/api/minwinbase/ns-minwinbase-filetime)\
298+ [CFileTime class]( cfiletime-class.md)\
299+ [Hierarchy chart ](../../mfc/hierarchy-chart.md)\
300+ [ATL/MFC shared classes ](../../atl-mfc-shared/atl-mfc-shared-classes.md)
0 commit comments