summaryrefslogtreecommitdiff
path: root/doc/html/chrono/appendices.html
blob: a986cf81ffe6f65eaeb467bbae91ffcb90555b3b (plain)
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendices</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../chrono.html" title="Chapter&#160;4.&#160;Boost.Chrono 1.2.3">
<link rel="prev" href="reference.html" title="Reference">
<link rel="next" href="../id319790-bb.html" title="Chapter&#160;5.&#160;Boost.Concept_Check">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="reference.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../chrono.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../id319790-bb.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="chrono.appendices"></a><a class="link" href="appendices.html" title="Appendices">Appendices</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history">Appendix: History</a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.rationale">Appendix: Rationale</a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.implementation">Appendix: Implementation
      Notes</a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.faq">Appendix: FAQ</a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.acknowledgements">Appendix: Acknowledgements</a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.todo">Appendix: Future plans</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.history"></a><a class="link" href="appendices.html#chrono.appendices.history" title="Appendix: History">Appendix: History</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_2_3__august_1__2012___1_51__"><span class="bold"><strong>Version 1.2.3, August 1, 2012 - 1.51</strong></span> </a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_2_2__april_1__2012___1_50__"><span class="bold"><strong>Version 1.2.2, April 1, 2012 - 1.50</strong></span> </a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_2_1__february_1__2012___1_49__"><span class="bold"><strong>Version 1.2.1, February 1, 2012 - 1.49</strong></span> </a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_2_0__october_17__2011___1_48___"><span class="bold"><strong>Version 1.2.0, October 17, 2011 - 1.48 </strong></span> </a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_1_0__mars_17__2011___1_47__"><span class="bold"><strong>Version 1.1.0, Mars 17, 2011 - 1.47</strong></span> </a></span></dt>
<dt><span class="section"><a href="appendices.html#chrono.appendices.history.__version_1_0_0__january_6__2011__"><span class="bold"><strong>Version 1.0.0, January 6, 2011</strong></span> </a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_2_3__august_1__2012___1_51__"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_2_3__august_1__2012___1_51__" title="Version 1.2.3, August 1, 2012 - 1.51"><span class="bold"><strong>Version 1.2.3, August 1, 2012 - 1.51</strong></span> </a>
</h4></div></div></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6918" target="_top">#6918</a>
              Boost Chrono compilation failure on HP uX due to undefined pthread_getcpuclockid.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6241" target="_top">#6241</a>
              boost::chrono compilation problems without std::wstring support.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6987" target="_top">#6987</a>
              Documentation &amp; C++11.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/7041" target="_top">#7041</a>
              time_point.hpp depends on Boost.System.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/7042" target="_top">#7042</a>
              Avoiding time_point and duration dependency on time.h and CLOCK_REALTIME.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/7058" target="_top">#7058</a>
              Make it work when BOOST_NO_EXCEPTIONS is defined.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/7069" target="_top">#7069</a>
              Misspellings in clock_string&lt;thread_clock&gt;.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/7081" target="_top">#7081</a>
              WinError.h capitalization in boost/detail/win/basic_types.hpp.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_2_2__april_1__2012___1_50__"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_2_2__april_1__2012___1_50__" title="Version 1.2.2, April 1, 2012 - 1.50"><span class="bold"><strong>Version 1.2.2, April 1, 2012 - 1.50</strong></span> </a>
</h4></div></div></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6361" target="_top">#6361</a>
              integer overflow in boost::chrono::process_real_cpu_clock::now() under
              Windows 32bits.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6628" target="_top">#6628</a>
              compiler warning in process_cpu_clocks.hpp.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6666" target="_top">#6666</a>
              thread_clock.hpp needs pthread.h.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_2_1__february_1__2012___1_49__"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_2_1__february_1__2012___1_49__" title="Version 1.2.1, February 1, 2012 - 1.49"><span class="bold"><strong>Version 1.2.1, February 1, 2012 - 1.49</strong></span> </a>
</h4></div></div></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6092" target="_top">#6092</a>
              Input from non integral durations makes the compiler fail.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6093" target="_top">#6093</a>
              [1/3]second fails as valid duration input.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6113" target="_top">#6113</a>
              duplicate symbol when BOOST_CHRONO_HEADER_ONLY is defined.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6243" target="_top">#6243</a>
              Sandia-pgi-11.9: more than one instance of overloaded function "min"
              matches.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/6257" target="_top">#6257</a>
              process_cpu_clock::now() on linux gives time_points 1/1000 times.
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_2_0__october_17__2011___1_48___"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_2_0__october_17__2011___1_48___" title="Version 1.2.0, October 17, 2011 - 1.48"><span class="bold"><strong>Version 1.2.0, October 17, 2011 - 1.48 </strong></span> </a>
</h4></div></div></div>
<p>
          <span class="bold"><strong>New Features:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5979" target="_top">#5979</a>
              Added chrono rounding utilities as defined By Howard Hinnant <a href="http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html" target="_top">here</a>.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5978" target="_top">#5978</a>
              Add BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5998" target="_top">#5998</a>
              Make possible to don't provide hybrid error handling.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5906" target="_top">#5906</a>
              Take in account the constexpr as defined in the standard.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5907" target="_top">#5907</a>
              Take in account noexcept for compilers supporting it.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5669" target="_top">#5669</a>
              Intel compiler failure to compile duration.hpp
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/2114" target="_top">#2114</a>
              Enable visibility support (Boost.Chrono part)
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5909" target="_top">#5909</a>
              process_cpu_clock::now() on MAC gives time_points 1/1000 times.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5946" target="_top">#5946</a>
              Process real cpu clock returns the system steady clock (windows).
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5974" target="_top">#5974</a>
              Process real cpu clock should use clock() instead of times() in MAC
              which is twice faster and have better resolution.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Cleanup:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5975" target="_top">#5975</a>
              Reduce the combinations of header-only, shared, static link to reduce
              test time by 50%.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5976" target="_top">#5976</a>
              chrono_accuracy_test is not deterministic and should be removed from
              the regression tests
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5977" target="_top">#5977</a>
              Remove old files from Beman's version. Some old files included in the
              Beman's version and not documented in the reviewed version that have
              been definitely removed from the repository as
              <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
                    boost/chrono/timer.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/process_times.hpp
                  </li>
<li class="listitem">
                    boost/chrono/detail/process_clock.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/detail/mac/process_clock.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/detail/posix/process_clock.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/detail/win/process_clock.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/detail/run_timer.hpp,
                  </li>
<li class="listitem">
                    boost/chrono/detail/run_timer_static.hpp,
                  </li>
</ul></div>
            </li>
</ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_1_0__mars_17__2011___1_47__"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_1_0__mars_17__2011___1_47__" title="Version 1.1.0, Mars 17, 2011 - 1.47"><span class="bold"><strong>Version 1.1.0, Mars 17, 2011 - 1.47</strong></span> </a>
</h4></div></div></div>
<p>
          <span class="bold"><strong>New Features:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/????" target="_top">#????</a>
              Added time_point unary operators +,-,++,-- and binary operators +<code class="literal">,-</code>
              with Rep al RHS.
            </li>
<li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5323" target="_top">#5323</a>
              Add Associated type difference_type for chrono::time_point.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
              <a href="http://svn.boost.org/trac/boost/ticket/5322" target="_top">#5322</a>
              Explicit default constructed chrono::durations are uninitialized
            </li></ul></div>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="chrono.appendices.history.__version_1_0_0__january_6__2011__"></a><a class="link" href="appendices.html#chrono.appendices.history.__version_1_0_0__january_6__2011__" title="Version 1.0.0, January 6, 2011"><span class="bold"><strong>Version 1.0.0, January 6, 2011</strong></span> </a>
</h4></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Moved chrono to trunk taking in account the review remarks.
            </li>
<li class="listitem">
              Documentation revision.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Features:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Boost_Chrono is now a configurable header-only library version (that
              also allows the user to choose if the <code class="computeroutput"><span class="identifier">windows</span><span class="special">.</span><span class="identifier">h</span></code>
              file is included or not).
            </li>
<li class="listitem">
              Added clock_string&lt;&gt; traits.
            </li>
<li class="listitem">
              Define chrono-io for all the clocks.
            </li>
<li class="listitem">
              Add input of process_times representation.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Implementation:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Use of detail/win files to avoid the use of windows.h file.
            </li>
<li class="listitem">
              Completed the error_code handling.
            </li>
<li class="listitem">
              Works now with BOOST_SYSTEM_NO_DEPRECATED.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Fixes:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Fix some warnings.
            </li>
<li class="listitem">
              Fix original errors on Mac
            </li>
<li class="listitem">
              Don't fix the link with boost_system to static.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Test:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
              Added test on process and thread clocks.
            </li>
<li class="listitem">
              Moved to lightweight_test.hpp.
            </li>
<li class="listitem">
              Able to test multiple configurations.
            </li>
</ul></div>
<p>
          <span class="bold"><strong>Doc:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
              Removed some not useful parts as the test and the tickets.
            </li></ul></div>
</div>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.rationale"></a><a class="link" href="appendices.html#chrono.appendices.rationale" title="Appendix: Rationale">Appendix: Rationale</a>
</h3></div></div></div>
<p>
        See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm" target="_top"><span class="bold"><strong>N2661 - A Foundation to Sleep On</strong></span></a> which is
        very informative and provides motivation for key design decisions. This section
        contains some extracts from this document.
      </p>
<h5>
<a name="chrono.appendices.rationale.h0"></a>
        <span><a name="chrono.appendices.rationale.why_duration_needs_operator_"></a></span><a class="link" href="appendices.html#chrono.appendices.rationale.why_duration_needs_operator_">Why duration
        needs operator%</a>
      </h5>
<p>
        This operator is convenient for computing where in a time frame a given duration
        lies. A motivating example is converting a duration into a "broken-down"
        time duration such as hours::minutes::seconds:
      </p>
<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">ClockTime</span>
<span class="special">{</span>
    <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">hours</span> <span class="identifier">hours</span><span class="special">;</span>
    <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">minutes</span> <span class="identifier">minutes</span><span class="special">;</span>
    <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span> <span class="identifier">seconds</span><span class="special">;</span>
<span class="keyword">public</span><span class="special">:</span>
    <span class="identifier">hours</span> <span class="identifier">hours_</span><span class="special">;</span>
    <span class="identifier">minutes</span> <span class="identifier">minutes_</span><span class="special">;</span>
    <span class="identifier">seconds</span> <span class="identifier">seconds_</span><span class="special">;</span>

    <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
      <span class="keyword">explicit</span> <span class="identifier">ClockTime</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">)</span>
        <span class="special">:</span> <span class="identifier">hours_</span>  <span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special">&lt;</span><span class="identifier">hours</span><span class="special">&gt;</span>  <span class="special">(</span><span class="identifier">d</span><span class="special">)),</span>
          <span class="identifier">minutes_</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special">&lt;</span><span class="identifier">minutes</span><span class="special">&gt;(</span><span class="identifier">d</span> <span class="special">%</span> <span class="identifier">hours</span><span class="special">(</span><span class="number">1</span><span class="special">))),</span>
          <span class="identifier">seconds_</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special">&lt;</span><span class="identifier">seconds</span><span class="special">&gt;(</span><span class="identifier">d</span> <span class="special">%</span> <span class="identifier">minutes</span><span class="special">(</span><span class="number">1</span><span class="special">)))</span>
          <span class="special">{}</span>
<span class="special">};</span>
</pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.implementation"></a><a class="link" href="appendices.html#chrono.appendices.implementation" title="Appendix: Implementation Notes">Appendix: Implementation
      Notes</a>
</h3></div></div></div>
<h5>
<a name="chrono.appendices.implementation.h0"></a>
        <span><a name="chrono.appendices.implementation.which_apis_have_been_chosen_to_implement_each_clock_on_each_platform_"></a></span><a class="link" href="appendices.html#chrono.appendices.implementation.which_apis_have_been_chosen_to_implement_each_clock_on_each_platform_">Which
        APIs have been chosen to implement each clock on each platform?</a>
      </h5>
<p>
        The following table presents a resume of which API is uused for each clock
        on each platform
      </p>
<div class="table">
<a name="chrono.appendices.implementation.clock_api_correspondence"></a><p class="title"><b>Table&#160;4.3.&#160;Clock API correspondence</b></p>
<div class="table-contents"><table class="table" summary="Clock API correspondence">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Clock
                </p>
              </th>
<th>
                <p>
                  Windows Platform
                </p>
              </th>
<th>
                <p>
                  Posix Platform
                </p>
              </th>
<th>
                <p>
                  Mac Platform
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.cpp0x.system_clocks_hpp.system_clock" title="Class system_clock"><code class="computeroutput"><span class="identifier">system_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetSystemTimeAsFileTime
                </p>
              </td>
<td>
                <p>
                  clock_gettime( CLOCK_REALTIME)
                </p>
              </td>
<td>
                <p>
                  gettimeofday
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.cpp0x.system_clocks_hpp.steady_clock" title="Class steady_clock"><code class="computeroutput"><span class="identifier">steady_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  QueryPerformanceCounter and QueryPerformanceFrequency
                </p>
              </td>
<td>
                <p>
                  clock_gettime( CLOCK_STEADY)
                </p>
              </td>
<td>
                <p>
                  mach_timebase_info,mach_absolute_time
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetProcessTimes
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetProcessTimes
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetProcessTimes
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.other_clocks.process_cpu_clocks_hpp.process_cpu_clock" title="Class process_cpu_clock"><code class="computeroutput"><span class="identifier">process_cpu_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetProcessTimes
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
<td>
                <p>
                  times
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="reference.html#chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a>
                </p>
              </td>
<td>
                <p>
                  GetThreadTimes
                </p>
              </td>
<td>
                <p>
                  clock_gettime(pthread_getcpuclockid)
                </p>
              </td>
<td>
                <p>
                  clock_gettime(pthread_getcpuclockid)
                </p>
              </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.faq"></a><a class="link" href="appendices.html#chrono.appendices.faq" title="Appendix: FAQ">Appendix: FAQ</a>
</h3></div></div></div>
<h5>
<a name="chrono.appendices.faq.h0"></a>
        <span><a name="chrono.appendices.faq.why_does_process_cpu_clock_sometimes_give_more_cpu_seconds_than_real_seconds_"></a></span><a class="link" href="appendices.html#chrono.appendices.faq.why_does_process_cpu_clock_sometimes_give_more_cpu_seconds_than_real_seconds_">Why
        does process_cpu_clock sometimes give more cpu seconds than real seconds?</a>
      </h5>
<p>
        Ask your operating system supplier. The results have been inspected with
        a debugger, and both for Windows and Linux, that's what the OS appears to
        be reporting at times.
      </p>
<h5>
<a name="chrono.appendices.faq.h1"></a>
        <span><a name="chrono.appendices.faq.are_integer_overflows_in_the_duration_arithmetic_detected_and_reported_"></a></span><a class="link" href="appendices.html#chrono.appendices.faq.are_integer_overflows_in_the_duration_arithmetic_detected_and_reported_">Are
        integer overflows in the duration arithmetic detected and reported?</a>
      </h5>
<p>
        <span class="bold"><strong>Boost.Ratio</strong></span> avoids all kind of overflow
        that could result of arithmetic operation and that can be simplified. The
        typedefs durations don't detect overflow. You will need a duration representation
        that handles overflow.
      </p>
<h5>
<a name="chrono.appendices.faq.h2"></a>
        <span><a name="chrono.appendices.faq.which_clocks_should_be_used_to_benchmarking_"></a></span><a class="link" href="appendices.html#chrono.appendices.faq.which_clocks_should_be_used_to_benchmarking_">Which
        clocks should be used to benchmarking?</a>
      </h5>
<p>
        Each clock has his own features. It depends on what do you need to benchmark.
        Most of the time, you could be interested in using a thread clock, but if
        you need to measure code subject to synchronization a process clock would
        be better. If you have a multi-process application, a system-wide clock could
        be needed.
      </p>
<h5>
<a name="chrono.appendices.faq.h3"></a>
        <span><a name="chrono.appendices.faq.which_clocks_should_be_used_for_watching_"></a></span><a class="link" href="appendices.html#chrono.appendices.faq.which_clocks_should_be_used_for_watching_">Which
        clocks should be used for watching?</a>
      </h5>
<p>
        For trace purposes, it is probably best to use a system-wide clock.
      </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.acknowledgements"></a><a class="link" href="appendices.html#chrono.appendices.acknowledgements" title="Appendix: Acknowledgements">Appendix: Acknowledgements</a>
</h3></div></div></div>
<p>
        The library's code was derived from Howard Hinnant's time2_demo prototype.
        Many thanks to Howard for making his code available under the Boost license.
        The original code was modified by Beman Dawes to conform to Boost conventions.
      </p>
<p>
        time2_demo contained this comment:
      </p>
<p>
        Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland,
        Terry Golubiewski, Daniel Krugler, Anthony Williams.
      </p>
<p>
        The file &lt;boost/chrono_io.hpp&gt; has been adapted from the experimental
        header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">chrono_io</span><span class="special">&gt;</span></code> from Howard Hinnant. Thanks for all Howard.
      </p>
<p>
        Howard Hinnant, who is the real author of the library, has provided valuable
        feedback and suggestions during the development of the library. In particular,
        The chrono_io_io.hpp source has been adapted from the experimental header
        <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">chrono_io</span><span class="special">&gt;</span></code> from Howard Hinnant.
      </p>
<p>
        The acceptance review of Boost.Ratio took place between November 5th and
        15th 2010. Many thanks to Anthony Williams, the review manager, and to all
        the reviewers: David Deakins, John Bytheway, Roland Bock and Paul A. Bristow.
      </p>
<p>
        Thanks to Ronald Bock, Andrew Chinoff, Paul A. Bristow and John Bytheway
        for his help polishing the documentation.
      </p>
<p>
        Thanks to Tom Tan for reporting some compiler issues with MSVC V10 beta and
        MinGW-gcc-4.4.0 and for the many pushing for an homogeneous <code class="computeroutput"><span class="identifier">process_cpu_clock</span></code> clock.
      </p>
<p>
        Thanks to Ronald Bock for reporting Valgind issues and for the many suggestions
        he made concerning the documentation.
      </p>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="chrono.appendices.todo"></a><a class="link" href="appendices.html#chrono.appendices.todo" title="Appendix: Future plans">Appendix: Future plans</a>
</h3></div></div></div>
<h5>
<a name="chrono.appendices.todo.h0"></a>
        <span><a name="chrono.appendices.todo.for_later_releases"></a></span><a class="link" href="appendices.html#chrono.appendices.todo.for_later_releases">For
        later releases</a>
      </h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
            Enhance chrono I/O
            <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
                  <a href="http://svn.boost.org/trac/boost/ticket/5980" target="_top">#5980</a>
                  Take care of the Howard Hinnant <a href="http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html" target="_top">proposal</a>
                  which has the advantage to provide I/O for system clocks using
                  the Gregorian Calendar.
                </li>
<li class="listitem">
                  <a href="http://svn.boost.org/trac/boost/ticket/5981" target="_top">#5981</a>
                  Added i/o state savers.
                </li>
</ul></div>
          </li>
<li class="listitem">
            Deprecate:
            <div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
                  chrono I/O: The manipulators duration_short, duration long are
                  depreceated. You should use the parameterized form duration_fmt
                  instead.
                </li>
<li class="listitem">
                  chrono I/O: The duraction_punc&lt;&gt; facet observers is_short_name,
                  is_long_name are depreceated. You should use is_prefix and is_symbol
                  instead.
                </li>
<li class="listitem">
                  chrono I/O: The duraction_punc&lt;&gt; facet constructors taking
                  as argument the literals duraction_punc&lt;&gt;::use_long or use
                  short are depreceated. You should use duration_style::prefix and
                  duration_style::symbol instead.
                </li>
<li class="listitem">
                  chrono I/O: The duraction_punc&lt;&gt; facet constructors taking
                  the long names for seconds, minutes and hours and the associated
                  observers short_name, long_name and name are depreceated. Boost.Chrono
                  allows the user to use an interface that could be customized to
                  take care of locale issues. The default behavior been to return
                  the English words.
                </li>
</ul></div>
          </li>
</ul></div>
<p>
        When BOOST_CHRONO_IO_V1_DONT_PROVIDE_DEPRECATED is defined the preceding
        deprecated functions are not available. In addition, the user needs to define
        the macro BOOST_CHRONO_IO_USES_EXTERNAL_LOCALIZATION to be able to customize
        the locale interface.
      </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
            Include Stopwatches.
          </li>
<li class="listitem">
            Include chrono::date as defined by Howard Hinnant <a href="http://home.roadrunner.com/~hinnant/bloomington/date.html" target="_top">here</a>.
          </li>
</ul></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2008 Howard Hinnant<br>Copyright &#169; 2006, 2008 Beman Dawes<br>Copyright &#169; 2009-2011 Vicente J. Botet
      Escriba<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="reference.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../chrono.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../id319790-bb.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>