From Jason Turner

[time.clock.tai.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8e2ecx9z/{from.md → to.md} +39 -0
tmp/tmp8e2ecx9z/{from.md → to.md} RENAMED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Overview <a id="time.clock.tai.overview">[[time.clock.tai.overview]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::chrono {
5
+ class tai_clock {
6
+ public:
7
+ using rep = a signed arithmetic type;
8
+ using period = ratio<unspecified, unspecified>;
9
+ using duration = chrono::duration<rep, period>;
10
+ using time_point = chrono::time_point<tai_clock>;
11
+ static constexpr bool is_steady = unspecified;
12
+
13
+ static time_point now();
14
+
15
+ template<class Duration>
16
+ static utc_time<common_type_t<Duration, seconds>>
17
+ to_utc(const tai_time<Duration>&) noexcept;
18
+ template<class Duration>
19
+ static tai_time<common_type_t<Duration, seconds>>
20
+ from_utc(const utc_time<Duration>&) noexcept;
21
+ };
22
+ }
23
+ ```
24
+
25
+ The clock `tai_clock` measures seconds since 1958-01-01 00:00:00 and is
26
+ offset 10s ahead of UTC at this date. That is, 1958-01-01 00:00:00 TAI
27
+ is equivalent to 1957-12-31 23:59:50 UTC. Leap seconds are not inserted
28
+ into TAI. Therefore every time a leap second is inserted into UTC, UTC
29
+ shifts another second with respect to TAI. For example by 2000-01-01
30
+ there had been 22 positive and 0 negative leap seconds inserted so
31
+ 2000-01-01 00:00:00 UTC is equivalent to 2000-01-01 00:00:32 TAI (22s
32
+ plus the initial 10s offset).
33
+
34
+ `tai_clock` is not a *Cpp17TrivialClock* unless the implementation can
35
+ guarantee that `tai_clock::now()` does not propagate an exception.
36
+
37
+ [*Note 1*: `noexcept(from_utc(utc_clock::now()))` is
38
+ `false`. — *end note*]
39
+