From Jason Turner

[time.clock.system]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5ttgkvpn/{from.md → to.md} +10 -8
tmp/tmp5ttgkvpn/{from.md → to.md} RENAMED
@@ -4,14 +4,14 @@ Objects of class `system_clock` represent wall clock time from the
4
  system-wide realtime clock.
5
 
6
  ``` cpp
7
  class system_clock {
8
  public:
9
- typedef see below rep;
10
- typedef ratio<unspecified, unspecified> period;
11
- typedef chrono::duration<rep, period> duration;
12
- typedef chrono::time_point<system_clock> time_point;
13
  static constexpr bool is_steady = unspecified;
14
 
15
  static time_point now() noexcept;
16
 
17
  // Map to C API
@@ -19,30 +19,32 @@ public:
19
  static time_point from_time_t(time_t t) noexcept;
20
  };
21
  ```
22
 
23
  ``` cpp
24
- typedef unspecified system_clock::rep;
25
  ```
26
 
27
  *Requires:*
28
  `system_clock::duration::min() < system_clock::duration::zero()` shall
29
- be `true`. This implies that `rep` is a signed type.
 
 
30
 
31
  ``` cpp
32
  static time_t to_time_t(const time_point& t) noexcept;
33
  ```
34
 
35
  *Returns:* A `time_t` object that represents the same point in time as
36
  `t` when both values are restricted to the coarser of the precisions of
37
- `time_t` and `time_point`. It is implementation defined whether values
38
  are rounded or truncated to the required precision.
39
 
40
  ``` cpp
41
  static time_point from_time_t(time_t t) noexcept;
42
  ```
43
 
44
  *Returns:* A `time_point` object that represents the same point in time
45
  as `t` when both values are restricted to the coarser of the precisions
46
- of `time_t` and `time_point`. It is implementation defined whether
47
  values are rounded or truncated to the required precision.
48
 
 
4
  system-wide realtime clock.
5
 
6
  ``` cpp
7
  class system_clock {
8
  public:
9
+ using rep = see below;
10
+ using period = ratio<unspecified, unspecified{}>;
11
+ using duration = chrono::duration<rep, period>;
12
+ using time_point = chrono::time_point<system_clock>;
13
  static constexpr bool is_steady = unspecified;
14
 
15
  static time_point now() noexcept;
16
 
17
  // Map to C API
 
19
  static time_point from_time_t(time_t t) noexcept;
20
  };
21
  ```
22
 
23
  ``` cpp
24
+ using system_clock::rep = unspecified;
25
  ```
26
 
27
  *Requires:*
28
  `system_clock::duration::min() < system_clock::duration::zero()` shall
29
+ be `true`.
30
+
31
+ [*Note 1*: This implies that `rep` is a signed type. — *end note*]
32
 
33
  ``` cpp
34
  static time_t to_time_t(const time_point& t) noexcept;
35
  ```
36
 
37
  *Returns:* A `time_t` object that represents the same point in time as
38
  `t` when both values are restricted to the coarser of the precisions of
39
+ `time_t` and `time_point`. It is *implementation-defined* whether values
40
  are rounded or truncated to the required precision.
41
 
42
  ``` cpp
43
  static time_point from_time_t(time_t t) noexcept;
44
  ```
45
 
46
  *Returns:* A `time_point` object that represents the same point in time
47
  as `t` when both values are restricted to the coarser of the precisions
48
+ of `time_t` and `time_point`. It is *implementation-defined* whether
49
  values are rounded or truncated to the required precision.
50