@@ -33,7 +33,7 @@ which is defined as follows:
33
33
};
34
34
35
35
To represent the range and resolution of ``timespec ``, we need to (A) have
36
- nanosecond resolution, and (B) use more than 64 bits (assuming a 64 bit ``time_t ``).
36
+ nanosecond resolution, and (B) use more than 64 bits (assuming a 64- bit ``time_t ``).
37
37
38
38
As the standard requires us to use the ``chrono `` interface, we have to define
39
39
our own filesystem clock which specifies the period and representation of
@@ -207,7 +207,7 @@ code in some way:
207
207
208
208
// Overflow during creation bug.
209
209
file_time_type timespec_to_file_time_type(struct timespec ts) {
210
- // woops! chrono::seconds and chrono::nanoseconds use a 64 bit representation
210
+ // woops! chrono::seconds and chrono::nanoseconds use a 64- bit representation
211
211
// this may overflow before it's converted to a file_time_type.
212
212
auto dur = seconds(ts.tv_sec) + nanoseconds(ts.tv_nsec);
213
213
return file_time_type(dur);
@@ -272,7 +272,7 @@ look like.
272
272
273
273
The first thing to notice is that we can't construct ``fs_timespec_rep `` like
274
274
a ``timespec `` by passing ``{secs, nsecs} ``. Instead we're limited to
275
- constructing it from a single 64 bit integer.
275
+ constructing it from a single 64- bit integer.
276
276
277
277
We also can't allow the user to inspect the ``tv_sec `` or ``tv_nsec `` values
278
278
directly. A ``chrono::duration `` represents its value as a tick period and a
@@ -350,12 +350,12 @@ Though the above example may appear silly, I think it follows from the incorrect
350
350
notion that using a ``timespec `` rep in chrono actually makes it act as if it
351
351
were an actual ``timespec ``.
352
352
353
- Interactions with 32 bit ``time_t ``
353
+ Interactions with 32- bit ``time_t ``
354
354
-----------------------------------
355
355
356
356
Up until now we've only be considering cases where ``time_t `` is 64 bits, but what
357
- about 32 bit systems/builds where ``time_t `` is 32 bits? (this is the common case
358
- for 32 bit builds).
357
+ about 32- bit systems/builds where ``time_t `` is 32 bits? (this is the common case
358
+ for 32- bit builds).
359
359
360
360
When ``time_t `` is 32 bits, we can implement ``file_time_type `` simply using 64-bit
361
361
``long long ``. There is no need to get either ``__int128_t `` or ``timespec `` emulation
@@ -431,11 +431,11 @@ Pros:
431
431
432
432
Cons:
433
433
434
- * It isn't always available (but on 64 bit machines, it normally is).
434
+ * It isn't always available (but on 64- bit machines, it normally is).
435
435
* It causes ``file_time_type `` to have a larger range than ``timespec ``.
436
436
* It doesn't always act the same as other builtin integer types. For example
437
437
with ``cout `` or ``to_string ``.
438
- * Allows implicit truncation to 64 bit integers.
438
+ * Allows implicit truncation to 64- bit integers.
439
439
* It can be implicitly converted to a builtin integer type by the user,
440
440
truncating its value.
441
441
0 commit comments