From Jason Turner

[ctime.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdvwck5y9/{from.md → to.md} +17 -8
tmp/tmpdvwck5y9/{from.md → to.md} RENAMED
@@ -1,11 +1,16 @@
1
  ## Header `<ctime>` synopsis <a id="ctime.syn">[[ctime.syn]]</a>
2
 
3
  ``` cpp
 
 
4
  #define NULL see [support.types.nullptr]
5
  #define CLOCKS_PER_SEC see below
6
  #define TIME_UTC see below
 
 
 
7
 
8
  namespace std {
9
  using size_t = see [support.types.layout];
10
  using clock_t = see below;
11
  using time_t = see below;
@@ -14,38 +19,40 @@ namespace std {
14
  struct tm;
15
 
16
  clock_t clock();
17
  double difftime(time_t time1, time_t time0);
18
  time_t mktime(tm* timeptr);
 
19
  time_t time(time_t* timer);
20
  int timespec_get(timespec* ts, int base);
21
- char* asctime(const tm* timeptr);
22
- char* ctime(const time_t* timer);
23
  tm* gmtime(const time_t* timer);
 
24
  tm* localtime(const time_t* timer);
 
25
  size_t strftime(char* s, size_t maxsize, const char* format, const tm* timeptr);
26
  }
27
  ```
28
 
29
  The contents of the header `<ctime>` are the same as the C standard
30
  library header `<time.h>`.[^1]
31
 
32
- The functions `asctime`, `ctime`, `gmtime`, and `localtime` are not
33
- required to avoid data races [[res.on.data.races]].
34
 
35
- See also: ISO C 7.27
36
 
37
  <!-- Link reference definitions -->
38
  [basic.lookup.argdep]: basic.md#basic.lookup.argdep
39
  [cpp17.equalitycomparable]: #cpp17.equalitycomparable
40
  [cpp17.lessthancomparable]: #cpp17.lessthancomparable
41
  [ctime.syn]: #ctime.syn
42
  [dcl.constexpr]: dcl.md#dcl.constexpr
43
  [filesystems]: input.md#filesystems
44
- [format.formatter]: utilities.md#format.formatter
45
- [format.string]: utilities.md#format.string
46
- [formatter.requirements]: utilities.md#formatter.requirements
47
  [intro.multithread]: basic.md#intro.multithread
48
  [lex.charset]: lex.md#lex.charset
49
  [meta.rqmts]: meta.md#meta.rqmts
50
  [numeric.requirements]: numerics.md#numeric.requirements
51
  [over.ics.rank]: over.md#over.ics.rank
@@ -163,10 +170,11 @@ See also: ISO C 7.27
163
  [time.duration.observer]: #time.duration.observer
164
  [time.duration.special]: #time.duration.special
165
  [time.format]: #time.format
166
  [time.format.spec]: #time.format.spec
167
  [time.general]: #time.general
 
168
  [time.hms]: #time.hms
169
  [time.hms.members]: #time.hms.members
170
  [time.hms.nonmembers]: #time.hms.nonmembers
171
  [time.hms.overview]: #time.hms.overview
172
  [time.hms.width]: #time.hms.width
@@ -217,9 +225,10 @@ See also: ISO C 7.27
217
  [time.zone.zonedtime.ctor]: #time.zone.zonedtime.ctor
218
  [time.zone.zonedtime.members]: #time.zone.zonedtime.members
219
  [time.zone.zonedtime.nonmembers]: #time.zone.zonedtime.nonmembers
220
  [time.zone.zonedtime.overview]: #time.zone.zonedtime.overview
221
  [time.zone.zonedtraits]: #time.zone.zonedtraits
 
222
 
223
  [^1]: `strftime` supports the C conversion specifiers `C`, `D`, `e`,
224
  `F`, `g`, `G`, `h`, `r`, `R`, `t`, `T`, `u`, `V`, and `z`, and the
225
  modifiers `E` and `O`.
 
1
  ## Header `<ctime>` synopsis <a id="ctime.syn">[[ctime.syn]]</a>
2
 
3
  ``` cpp
4
+ #define __STDC_VERSION_TIME_H__ 202311L
5
+
6
  #define NULL see [support.types.nullptr]
7
  #define CLOCKS_PER_SEC see below
8
  #define TIME_UTC see below
9
+ #define TIME_MONOTONIC see below // optional
10
+ #define TIME_ACTIVE see below // optional
11
+ #define TIME_THREAD_ACTIVE see below // optional
12
 
13
  namespace std {
14
  using size_t = see [support.types.layout];
15
  using clock_t = see below;
16
  using time_t = see below;
 
19
  struct tm;
20
 
21
  clock_t clock();
22
  double difftime(time_t time1, time_t time0);
23
  time_t mktime(tm* timeptr);
24
+ time_t timegm(tm* timeptr);
25
  time_t time(time_t* timer);
26
  int timespec_get(timespec* ts, int base);
27
+ int timespec_getres(timespec* ts, int base);
 
28
  tm* gmtime(const time_t* timer);
29
+ tm* gmtime_r(const time_t* timer, tm* buf);
30
  tm* localtime(const time_t* timer);
31
+ tm* localtime_r(const time_t* timer, tm* buf);
32
  size_t strftime(char* s, size_t maxsize, const char* format, const tm* timeptr);
33
  }
34
  ```
35
 
36
  The contents of the header `<ctime>` are the same as the C standard
37
  library header `<time.h>`.[^1]
38
 
39
+ The functions `gmtime` and `localtime` are not required to avoid data
40
+ races [[res.on.data.races]].
41
 
42
+ See also: ISO C 7.29
43
 
44
  <!-- Link reference definitions -->
45
  [basic.lookup.argdep]: basic.md#basic.lookup.argdep
46
  [cpp17.equalitycomparable]: #cpp17.equalitycomparable
47
  [cpp17.lessthancomparable]: #cpp17.lessthancomparable
48
  [ctime.syn]: #ctime.syn
49
  [dcl.constexpr]: dcl.md#dcl.constexpr
50
  [filesystems]: input.md#filesystems
51
+ [format.formatter]: text.md#format.formatter
52
+ [format.string]: text.md#format.string
53
+ [formatter.requirements]: text.md#formatter.requirements
54
  [intro.multithread]: basic.md#intro.multithread
55
  [lex.charset]: lex.md#lex.charset
56
  [meta.rqmts]: meta.md#meta.rqmts
57
  [numeric.requirements]: numerics.md#numeric.requirements
58
  [over.ics.rank]: over.md#over.ics.rank
 
170
  [time.duration.observer]: #time.duration.observer
171
  [time.duration.special]: #time.duration.special
172
  [time.format]: #time.format
173
  [time.format.spec]: #time.format.spec
174
  [time.general]: #time.general
175
+ [time.hash]: #time.hash
176
  [time.hms]: #time.hms
177
  [time.hms.members]: #time.hms.members
178
  [time.hms.nonmembers]: #time.hms.nonmembers
179
  [time.hms.overview]: #time.hms.overview
180
  [time.hms.width]: #time.hms.width
 
225
  [time.zone.zonedtime.ctor]: #time.zone.zonedtime.ctor
226
  [time.zone.zonedtime.members]: #time.zone.zonedtime.members
227
  [time.zone.zonedtime.nonmembers]: #time.zone.zonedtime.nonmembers
228
  [time.zone.zonedtime.overview]: #time.zone.zonedtime.overview
229
  [time.zone.zonedtraits]: #time.zone.zonedtraits
230
+ [unord.hash]: utilities.md#unord.hash
231
 
232
  [^1]: `strftime` supports the C conversion specifiers `C`, `D`, `e`,
233
  `F`, `g`, `G`, `h`, `r`, `R`, `t`, `T`, `u`, `V`, and `z`, and the
234
  modifiers `E` and `O`.