-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrss.xml
More file actions
6533 lines (6086 loc) · 302 KB
/
Copy pathrss.xml
File metadata and controls
6533 lines (6086 loc) · 302 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>cpprefjp - C++日本語リファレンス</title>
<link href="https://cpprefjp.github.io" />
<updated>2026-08-19T08:41:07.446973</updated>
<id>178e92d1-fb88-4ba5-83f2-7c54fd712c06</id>
<entry>
<title>from_time_t -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/chrono/system_clock/from_time_t.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/chrono/system_clock/from_time_t.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/chrono/system_clock/from_time_t.md b/reference/chrono/system_clock/from_time_t.md
index c745e871a..474ace58b 100644
--- a/reference/chrono/system_clock/from_time_t.md
+++ b/reference/chrono/system_clock/from_time_t.md
@@ -47,7 +47,7 @@ int main()
* system_clock::from_time_t(t)[color ff0000]
* to_time_t[link to_time_t.md]
* std::time_t[link /reference/ctime/time_t.md]
-* std::time[link /reference/ctime/time.md.nolink]
+* std::time[link /reference/ctime/time.md]
* std::ctime[link /reference/ctime/ctime.md]
### 出力例
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>time_point -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/chrono/time_point.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/chrono/time_point.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/chrono/time_point.md b/reference/chrono/time_point.md
index 13d531a45..e24146010 100644
--- a/reference/chrono/time_point.md
+++ b/reference/chrono/time_point.md
@@ -128,8 +128,8 @@ int main() {
* now()[link system_clock/now.md]
* to_time_t[link system_clock/to_time_t.md]
* std::time_t[link /reference/ctime/time_t.md]
-* std::tm[link /reference/ctime/tm.md.nolink]
-* std::localtime[link /reference/ctime/localtime.md.nolink]
+* std::tm[link /reference/ctime/tm.md]
+* std::localtime[link /reference/ctime/localtime.md]
### 出力例
```
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>year_month_day -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/chrono/year_month_day.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/chrono/year_month_day.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/chrono/year_month_day.md b/reference/chrono/year_month_day.md
index 6c99a9778..6fa7ddc06 100644
--- a/reference/chrono/year_month_day.md
+++ b/reference/chrono/year_month_day.md
@@ -234,7 +234,7 @@ int main()
}
```
* std::time_t[link /reference/ctime/time_t.md]
-* std::time[link /reference/ctime/time.md.nolink]
+* std::time[link /reference/ctime/time.md]
* chrono::system_clock[link system_clock.md]
* from_time_t[link system_clock/from_time_t.md]
* chrono::floor[link time_point/floor.md]
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>srand -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/cstdlib/srand.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/cstdlib/srand.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/cstdlib/srand.md b/reference/cstdlib/srand.md
index 310547325..972dd3a5a 100644
--- a/reference/cstdlib/srand.md
+++ b/reference/cstdlib/srand.md
@@ -48,5 +48,5 @@ int main()
## 関連項目
- [`rand`](rand.md):疑似乱数を生成する
- [`RAND_MAX`](rand_max.md):`std::rand()`が返す最高値。
-- [`time`](/reference/ctime/time.md.nolink):時刻を取得する
+- [`time`](/reference/ctime/time.md):時刻を取得する
- [`time_t`](/reference/ctime/time_t.md):UNIX時間を表すための型。
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>ctime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<content type="html"><div class="header">&lt;ctime&gt;</div><h1 itemprop="name"><span class="token">ctime</span></h1>
<div itemprop="articleBody"><p><code>&lt;ctime&gt;</code>ヘッダでは、日付と時間に関する機能を定義する。</p>
<h2>マクロ</h2>
<table border="1" bordercolor="#888" style="border-collapse:collapse">
<thead>
<tr>
<th>名前</th>
<th>説明</th>
<th>対応バージョン</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="cstddef/null.html">NULL</a></code></td>
<td>ヌルポインタ定数</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/clocks_per_sec.html">CLOCKS_PER_SEC</a></code></td>
<td><code>clock()</code>関数によって返される1秒あたりの数値</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/time_utc.html">TIME_UTC</a></code></td>
<td>UTC時間ベースであることを指定するための0より大きい整数定数値</td>
<td>C++17</td>
</tr>
<tr>
<td><code><a href="ctime/time_monotonic.html">TIME_MONOTONIC</a></code></td>
<td>単調増加時間ベースであることを指定するための整数定数値 (処理系定義)</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/time_active.html">TIME_ACTIVE</a></code></td>
<td>プロセスのCPU時間ベースであることを指定するための整数定数値 (処理系定義)</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/time_thread_active.html">TIME_THREAD_ACTIVE</a></code></td>
<td>スレッドのCPU時間ベースであることを指定するための整数定数値 (処理系定義)</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/stdc_version_time_h.html">__STDC_VERSION_TIME_H__</a></code></td>
<td><code>&lt;ctime&gt;</code>が提供するC標準ライブラリ機能のバージョン (<code>202311L</code>)</td>
<td>C++26</td>
</tr>
</tbody>
</table>
<h2>型</h2>
<table border="1" bordercolor="#888" style="border-collapse:collapse">
<thead>
<tr>
<th>名前</th>
<th>説明</th>
<th>対応バージョン</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="cstddef/size_t.html">size_t</a></code></td>
<td>符号なし整数型</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/clock_t.html">clock_t</a></code></td>
<td><code>clock()</code>関数が返すプロセッサ時間を表す型</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/time_t.html">time_t</a></code></td>
<td>時間を表す型</td>
<td></td>
</tr>
</tbody>
</table>
<h2>構造体</h2>
<table border="1" bordercolor="#888" style="border-collapse:collapse">
<thead>
<tr>
<th>名前</th>
<th>説明</th>
<th>対応バージョン</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="ctime/timespec.html">timespec</a></code></td>
<td>指定されたベース時間に基づいた、経過秒と経過ナノ秒を保持する型</td>
<td>C++17</td>
</tr>
<tr>
<td><code><a href="ctime/tm.html">tm</a></code></td>
<td>カレンダー時間を保持する型</td>
<td></td>
</tr>
</tbody>
</table>
<h2>関数</h2>
<table border="1" bordercolor="#888" style="border-collapse:collapse">
<thead>
<tr>
<th>名前</th>
<th>説明</th>
<th>対応バージョン</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="ctime/clock.html">clock</a></code></td>
<td>プログラム実行開始からの経過時間を取得する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/difftime.html">difftime</a></code></td>
<td>2つの時間の差を計算する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/mktime.html">mktime</a></code></td>
<td>カレンダー時間から経過秒を生成する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/timegm.html">timegm</a></code></td>
<td>UTCのカレンダー時間から経過秒を生成する</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/gmtime.html">gmtime</a></code></td>
<td>経過秒からカレンダー時間を生成する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/gmtime_r.html">gmtime_r</a></code></td>
<td>経過秒からカレンダー時間を生成する (利用者が用意したバッファに格納する)</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/localtime.html">localtime</a></code></td>
<td>経過秒からローカル時間のカレンダー時間を生成する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/localtime_r.html">localtime_r</a></code></td>
<td>経過秒からローカル時間のカレンダー時間を生成する (利用者が用意したバッファに格納する)</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/time.html">time</a></code></td>
<td>現在時間までの経過秒を取得する</td>
<td></td>
</tr>
<tr>
<td><code><a href="ctime/timespec_get.html">timespec_get</a></code></td>
<td>指定したベース時間に基づいた、経過秒と経過ナノ秒を取得する</td>
<td>C++17</td>
</tr>
<tr>
<td><code><a href="ctime/timespec_getres.html">timespec_getres</a></code></td>
<td>指定したベース時間の分解能を取得する</td>
<td>C++26</td>
</tr>
<tr>
<td><code><a href="ctime/asctime.html">asctime</a></code></td>
<td>カレンダー時間を文字列化する</td>
<td>C++26で非推奨</td>
</tr>
<tr>
<td><code><a href="ctime/ctime.html">ctime</a></code></td>
<td>経過秒を日時として文字列化する</td>
<td>C++26で非推奨</td>
</tr>
<tr>
<td><code><a href="ctime/strftime.html">strftime</a></code></td>
<td>指定したフォーマットでカレンダー時間を文字列化する</td>
<td></td>
</tr>
</tbody>
</table>
<h2>関連項目</h2>
<ul>
<li><code><a href="chrono.html">&lt;chrono&gt;</a></code></li>
</ul>
<h2>参照</h2>
<ul>
<li><a href="https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3348r4.pdf" target="_blank">P3348R4 C++26 should refer to C23 not C17</a><ul>
<li>C++26がC23を参照するようになり、<code>timegm</code>・<code>gmtime_r</code>・<code>localtime_r</code>・<code>timespec_getres</code>と、<code>TIME_MONOTONIC</code>・<code>TIME_ACTIVE</code>・<code>TIME_THREAD_ACTIVE</code>・<code>__STDC_VERSION_TIME_H__</code>が追加された。また<code>asctime</code>・<code>ctime</code>が非推奨となった</li>
</ul>
</li>
</ul></div></content>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>asctime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/asctime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/asctime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/asctime.md b/reference/ctime/asctime.md
index cae4a879b..21595ff74 100644
--- a/reference/ctime/asctime.md
+++ b/reference/ctime/asctime.md
@@ -9,7 +9,7 @@ namespace std {
char* asctime(const tm* timeptr);
}
```
-* tm[link tm.md.nolink]
+* tm[link tm.md]
この関数は、C++26で非推奨となった。代わりに`strftime`関数や、[`&lt;chrono&gt;`](/reference/chrono.md)ライブラリの書式化機能を使用すること。
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>clock -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/clock.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/clock.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/clock.md b/reference/ctime/clock.md
new file mode 100644
index 000000000..7a88f6838
--- /dev/null
+++ b/reference/ctime/clock.md
@@ -0,0 +1,71 @@
+# clock
+* ctime[meta header]
+* std[meta namespace]
+* function[meta id-type]
+
+```cpp
+namespace std {
+ clock_t clock();
+}
+```
+* clock_t[link clock_t.md]
+
+## 概要
+プログラムの実行開始からの、処理系が使用したプロセッサ時間を取得する。
+
+ここで得られる時間は、実世界の経過時間 (wall-clock time) ではなく、プログラムが処理系上で消費したCPU時間である。
+
+
+## 戻り値
+プログラム実行開始からの経過プロセッサ時間を、[`clock_t`](clock_t.md)型の値として返す。
+
+プロセッサ時間が取得できない、もしくは値が表現できない場合、`(clock_t)(-1)`を返す。
+
+
+## 備考
+戻り値を秒単位の値に変換するには、[`CLOCKS_PER_SEC`](clocks_per_sec.md)で割る。
+
+2点間の経過時間を計測するには、計測対象の前後で`clock()`を呼び出し、その差を求める。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ std::clock_t start = std::clock();
+
+ // 計測対象の処理
+ volatile long sum = 0;
+ for (int i = 0; i &lt; 100000000; ++i) {
+ sum += i;
+ }
+
+ std::clock_t end = std::clock();
+
+ // 経過したプロセッサ時間を秒に変換する
+ double sec = static_cast&lt;double&gt;(end - start) / CLOCKS_PER_SEC;
+ std::cout &lt;&lt; sec &lt;&lt; &#34;秒&#34; &lt;&lt; std::endl;
+}
+```
+* std::clock[color ff0000]
+* std::clock_t[link clock_t.md]
+* CLOCKS_PER_SEC[link clocks_per_sec.md]
+
+### 出力例
+```
+0.21秒
+```
+
+
+## バージョン
+### 言語
+- C++03
+
+
+## 関連項目
+- [`clock_t`](clock_t.md)
+- [`CLOCKS_PER_SEC`](clocks_per_sec.md)
+- [`&lt;chrono&gt;`](/reference/chrono.md)
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>clock_t -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/clock_t.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/clock_t.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/clock_t.md b/reference/ctime/clock_t.md
new file mode 100644
index 000000000..e833301d7
--- /dev/null
+++ b/reference/ctime/clock_t.md
@@ -0,0 +1,58 @@
+# clock_t
+* ctime[meta header]
+* std[meta namespace]
+* type-alias[meta id-type]
+
+```cpp
+namespace std {
+ using clock_t = arithmetic-type;
+}
+```
+* arithmetic-type[italic]
+
+## 概要
+`clock_t`は、[`clock()`](clock.md)関数が返すプロセッサ時間を表すための、算術型の別名である。
+
+この型の値を秒数に変換するには、[`CLOCKS_PER_SEC`](clocks_per_sec.md)で割る。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ std::clock_t start = std::clock();
+
+ // 計測対象の処理
+ volatile long sum = 0;
+ for (int i = 0; i &lt; 100000000; ++i) {
+ sum += i;
+ }
+
+ std::clock_t end = std::clock();
+
+ // 経過したプロセッサ時間を秒に変換する
+ double sec = static_cast&lt;double&gt;(end - start) / CLOCKS_PER_SEC;
+ std::cout &lt;&lt; sec &lt;&lt; &#34;秒&#34; &lt;&lt; std::endl;
+}
+```
+* std::clock_t[color ff0000]
+* std::clock[link clock.md]
+* CLOCKS_PER_SEC[link clocks_per_sec.md]
+
+### 出力例
+```
+0.21秒
+```
+
+
+## バージョン
+### 言語
+- C++03
+
+
+## 関連項目
+- [`clock`](clock.md): プログラム実行開始からの経過時間を取得する
+- [`CLOCKS_PER_SEC`](clocks_per_sec.md)
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>CLOCKS_PER_SEC -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/clocks_per_sec.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/clocks_per_sec.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/clocks_per_sec.md b/reference/ctime/clocks_per_sec.md
new file mode 100644
index 000000000..67553c465
--- /dev/null
+++ b/reference/ctime/clocks_per_sec.md
@@ -0,0 +1,49 @@
+# CLOCKS_PER_SEC
+* ctime[meta header]
+* macro[meta id-type]
+
+```cpp
+#define CLOCKS_PER_SEC implementation-defined
+```
+
+## 概要
+[`clock()`](clock.md)関数が返す[`clock_t`](clock_t.md)値の、1秒あたりの数値。
+
+[`clock()`](clock.md)が返した値をこの値で割ることで、秒単位のプロセッサ時間が得られる。値は処理系定義であり、C標準では`1000000` (10&lt;sup&gt;6&lt;/sup&gt;) に展開されることが規定されている。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ std::clock_t start = std::clock();
+
+ // 計測対象の処理
+ volatile long sum = 0;
+ for (int i = 0; i &lt; 100000000; ++i) {
+ sum += i;
+ }
+
+ std::clock_t end = std::clock();
+
+ // 経過したプロセッサ時間を秒に変換する
+ double sec = static_cast&lt;double&gt;(end - start) / CLOCKS_PER_SEC;
+ std::cout &lt;&lt; sec &lt;&lt; &#34;秒&#34; &lt;&lt; std::endl;
+}
+```
+* CLOCKS_PER_SEC[color ff0000]
+* std::clock_t[link clock_t.md]
+* std::clock[link clock.md]
+
+### 出力例
+```
+0.21秒
+```
+
+
+## 関連項目
+- [`clock`](clock.md): プログラム実行開始からの経過時間を取得する
+- [`clock_t`](clock_t.md)
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>difftime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/difftime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/difftime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/difftime.md b/reference/ctime/difftime.md
new file mode 100644
index 000000000..757d64d00
--- /dev/null
+++ b/reference/ctime/difftime.md
@@ -0,0 +1,66 @@
+# difftime
+* ctime[meta header]
+* std[meta namespace]
+* function[meta id-type]
+
+```cpp
+namespace std {
+ double difftime(time_t time1, time_t time0);
+}
+```
+* time_t[link time_t.md]
+
+## 概要
+2つの時間の差を、秒単位で計算する。
+
+
+## 戻り値
+`time1 - time0`を秒数として表した値 (`double`型) を返す。
+
+
+## 備考
+[`time_t`](time_t.md)は算術型であるが、その値のエンコーディングは処理系定義であり、必ずしも秒単位とは限らない。2つの[`time_t`](time_t.md)値の差を正しく秒数として求めるには、単純な減算ではなくこの関数を使用する。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ // 2026年1月1日
+ std::tm a{};
+ a.tm_year = 2026 - 1900;
+ a.tm_mon = 0;
+ a.tm_mday = 1;
+
+ // 2026年1月2日
+ std::tm b{};
+ b.tm_year = 2026 - 1900;
+ b.tm_mon = 0;
+ b.tm_mday = 2;
+
+ // 2つの時間の差を秒数で求める
+ double sec = std::difftime(std::mktime(&amp;b), std::mktime(&amp;a));
+ std::cout &lt;&lt; sec &lt;&lt; std::endl;
+}
+```
+* std::difftime[color ff0000]
+* std::tm[link tm.md]
+* std::mktime[link mktime.md]
+
+### 出力
+```
+86400
+```
+
+
+## バージョン
+### 言語
+- C++03
+
+
+## 関連項目
+- [`time`](time.md): 現在時間までの経過秒を取得する
+- [`mktime`](mktime.md): カレンダー時間から経過秒を生成する
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>gmtime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/gmtime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/gmtime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/gmtime.md b/reference/ctime/gmtime.md
new file mode 100644
index 000000000..ca8b542da
--- /dev/null
+++ b/reference/ctime/gmtime.md
@@ -0,0 +1,67 @@
+# gmtime
+* ctime[meta header]
+* std[meta namespace]
+* function[meta id-type]
+
+```cpp
+namespace std {
+ tm* gmtime(const time_t* timer);
+}
+```
+* time_t[link time_t.md]
+* tm[link tm.md]
+
+## 概要
+経過秒 ([`time_t`](time_t.md)) を、UTCで表現されたカレンダー時間 (`tm`構造体) に変換する。
+
+ローカル時間に変換する[`localtime`](localtime.md)に対し、この関数はUTC (協定世界時) に変換する。
+
+
+## 効果
+`timer`が指すカレンダー時間を、UTCで表現された要素別の時間に変換する。
+
+
+## 戻り値
+変換した要素別の時間を指すポインタを返す。
+
+指定された時間をUTCに変換できない場合、ヌルポインタを返す。
+
+
+## 備考
+戻り値は静的に確保された領域を指すため、`gmtime`や[`localtime`](localtime.md)の呼び出しのたびに上書きされる可能性がある。スレッドセーフに変換するには、C++26で追加された[`gmtime_r`](gmtime_r.md)を使用する。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ // エポック (1970年1月1日 00:00:00 UTC)
+ std::time_t t = 0;
+
+ std::tm* utc = std::gmtime(&amp;t);
+ std::cout &lt;&lt; (utc-&gt;tm_year + 1900) &lt;&lt; &#34;年&#34;
+ &lt;&lt; (utc-&gt;tm_mon + 1) &lt;&lt; &#34;月&#34;
+ &lt;&lt; utc-&gt;tm_mday &lt;&lt; &#34;日&#34; &lt;&lt; std::endl;
+}
+```
+* std::gmtime[color ff0000]
+* std::tm[link tm.md]
+
+### 出力
+```
+1970年1月1日
+```
+
+
+## バージョン
+### 言語
+- C++03
+
+
+## 関連項目
+- [`gmtime_r`](gmtime_r.md): 経過秒からUTCのカレンダー時間を生成する (バッファ指定)
+- [`localtime`](localtime.md): 経過秒からローカル時間のカレンダー時間を生成する
+- [`mktime`](mktime.md): カレンダー時間から経過秒を生成する
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>gmtime_r -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/gmtime_r.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/gmtime_r.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/gmtime_r.md b/reference/ctime/gmtime_r.md
index dd0174393..c68261a2f 100644
--- a/reference/ctime/gmtime_r.md
+++ b/reference/ctime/gmtime_r.md
@@ -10,12 +10,12 @@ namespace std {
}
```
* time_t[link time_t.md]
-* tm[link tm.md.nolink]
+* tm[link tm.md]
## 概要
経過秒 ([`time_t`](time_t.md)) を、UTCで表現されたカレンダー時間 (`tm`構造体) に変換する。
-[`gmtime`](gmtime.md.nolink)と異なり、結果を利用者が用意したバッファ`buf`に格納するため、スレッドセーフである。
+[`gmtime`](gmtime.md)と異なり、結果を利用者が用意したバッファ`buf`に格納するため、スレッドセーフである。
C23で`&lt;time.h&gt;`に追加された関数であり、C++26で`&lt;ctime&gt;`に取り込まれた。
@@ -64,7 +64,7 @@ int main()
## 関連項目
-- [`gmtime`](gmtime.md.nolink): 経過秒からUTCのカレンダー時間を生成する
+- [`gmtime`](gmtime.md): 経過秒からUTCのカレンダー時間を生成する
- [`localtime_r`](localtime_r.md): 経過秒からローカル時間のカレンダー時間を生成する (バッファ指定)
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>localtime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/localtime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/localtime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/localtime.md b/reference/ctime/localtime.md
new file mode 100644
index 000000000..e26f6decf
--- /dev/null
+++ b/reference/ctime/localtime.md
@@ -0,0 +1,68 @@
+# localtime
+* ctime[meta header]
+* std[meta namespace]
+* function[meta id-type]
+
+```cpp
+namespace std {
+ tm* localtime(const time_t* timer);
+}
+```
+* time_t[link time_t.md]
+* tm[link tm.md]
+
+## 概要
+経過秒 ([`time_t`](time_t.md)) を、ローカル時間で表現されたカレンダー時間 (`tm`構造体) に変換する。
+
+UTCに変換する[`gmtime`](gmtime.md)に対し、この関数は処理系のタイムゾーン設定に基づいたローカル時間に変換する。
+
+
+## 効果
+`timer`が指すカレンダー時間を、ローカル時間で表現された要素別の時間に変換する。
+
+
+## 戻り値
+変換した要素別の時間を指すポインタを返す。
+
+指定された時間をローカル時間に変換できない場合、ヌルポインタを返す。
+
+
+## 備考
+戻り値は静的に確保された領域を指すため、`localtime`や[`gmtime`](gmtime.md)の呼び出しのたびに上書きされる可能性がある。スレッドセーフに変換するには、C++26で追加された[`localtime_r`](localtime_r.md)を使用する。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ // 現在日時を、ローカル時間のカレンダー時間に変換する
+ std::time_t t = std::time(nullptr);
+ std::tm* lt = std::localtime(&amp;t);
+
+ std::cout &lt;&lt; (lt-&gt;tm_year + 1900) &lt;&lt; &#34;年&#34;
+ &lt;&lt; (lt-&gt;tm_mon + 1) &lt;&lt; &#34;月&#34;
+ &lt;&lt; lt-&gt;tm_mday &lt;&lt; &#34;日&#34; &lt;&lt; std::endl;
+}
+```
+* std::localtime[color ff0000]
+* std::time[link time.md]
+* std::tm[link tm.md]
+
+### 出力例
+```
+2026年8月19日
+```
+
+
+## バージョン
+### 言語
+- C++03
+
+
+## 関連項目
+- [`localtime_r`](localtime_r.md): 経過秒からローカル時間のカレンダー時間を生成する (バッファ指定)
+- [`gmtime`](gmtime.md): 経過秒からUTCのカレンダー時間を生成する
+- [`mktime`](mktime.md): カレンダー時間から経過秒を生成する
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>localtime_r -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/localtime_r.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/localtime_r.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/localtime_r.md b/reference/ctime/localtime_r.md
index 311b852f3..690684b43 100644
--- a/reference/ctime/localtime_r.md
+++ b/reference/ctime/localtime_r.md
@@ -10,12 +10,12 @@ namespace std {
}
```
* time_t[link time_t.md]
-* tm[link tm.md.nolink]
+* tm[link tm.md]
## 概要
経過秒 ([`time_t`](time_t.md)) を、ローカル時間で表現されたカレンダー時間 (`tm`構造体) に変換する。
-[`localtime`](localtime.md.nolink)と異なり、結果を利用者が用意したバッファ`buf`に格納するため、スレッドセーフである。
+[`localtime`](localtime.md)と異なり、結果を利用者が用意したバッファ`buf`に格納するため、スレッドセーフである。
C23で`&lt;time.h&gt;`に追加された関数であり、C++26で`&lt;ctime&gt;`に取り込まれた。
@@ -64,7 +64,7 @@ int main()
## 関連項目
-- [`localtime`](localtime.md.nolink): 経過秒からローカル時間のカレンダー時間を生成する
+- [`localtime`](localtime.md): 経過秒からローカル時間のカレンダー時間を生成する
- [`gmtime_r`](gmtime_r.md): 経過秒からUTCのカレンダー時間を生成する (バッファ指定)
</code></pre></summary>
<author>
<name>Akira Takahashi</name>
<email>faithandbrave@gmail.com</email>
</author>
</entry>
<entry>
<title>mktime -- ctimeの残作業になっていたページを作成</title>
<link href="https://cpprefjp.github.io/reference/ctime/mktime.html"/>
<id>a27ea407efa84edf236432f19f65730a1811fd77:reference/ctime/mktime.md</id>
<updated>2026-08-19T17:38:50+09:00</updated>
<summary type="html"><pre><code>diff --git a/reference/ctime/mktime.md b/reference/ctime/mktime.md
new file mode 100644
index 000000000..78ca1d441
--- /dev/null
+++ b/reference/ctime/mktime.md
@@ -0,0 +1,68 @@
+# mktime
+* ctime[meta header]
+* std[meta namespace]
+* function[meta id-type]
+
+```cpp
+namespace std {
+ time_t mktime(tm* timeptr);
+}
+```
+* time_t[link time_t.md]
+* tm[link tm.md]
+
+## 概要
+ローカル時間で表現されたカレンダー時間 (`tm`構造体) を、経過秒 ([`time_t`](time_t.md)) に変換する。
+
+入力をUTCとして解釈する[`timegm`](timegm.md)に対し、この関数は入力をローカル時間として解釈する。
+
+
+## 効果
+`timeptr`が指す構造体のカレンダー時間 (ローカル時間として表現される) を、`time`関数が返す値と同じエンコーディングの経過秒に変換する。
+
+`tm_wday`と`tm_yday`の元の値は無視され、それ以外のメンバは規定の範囲に制限されない。変換に成功した場合、`tm_wday`と`tm_yday`は適切に設定され、その他のメンバは規定の範囲に正規化される。
+
+
+## 戻り値
+指定されたカレンダー時間を[`time_t`](time_t.md)型の値として返す。
+
+カレンダー時間が[`time_t`](time_t.md)で表現できない場合、`(time_t)(-1)`を返す。
+
+
+## 例
+```cpp example
+#include &lt;ctime&gt;
+#include &lt;iostream&gt;
+
+int main()
+{
+ // 2026年1月1日 (曜日は未設定)
+ std::tm t{};
+ t.tm_year = 2026 - 1900;
+ t.tm_mon = 0;
+ t.tm_mday = 1;
+
+ std::mktime(&amp;t);
+
+ // mktimeによってtm_wdayが設定される (0が日曜、4は木曜)
+ std::cout &lt;&lt; t.tm_wday &lt;&lt; std::endl;
+}
+```
+* std::mktime[color ff0000]
+* std::tm[link tm.md]
+
+### 出力
+```
+4
+```
+