1 | <?xml version="1.0" encoding="utf-8"?> |
---|
2 | <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" |
---|
3 | "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd" [ |
---|
4 | <!ENTITY % threads.entities SYSTEM "entities.xml"> |
---|
5 | %threads.entities; |
---|
6 | ]> |
---|
7 | <header name="boost/thread/xtime.hpp" |
---|
8 | last-revision="$Date: 2004/07/17 04:33:59 $"> |
---|
9 | <namespace name="boost"> |
---|
10 | <enum name="xtime_clock_types"> |
---|
11 | <enumvalue name="TIME_UTC" /> |
---|
12 | |
---|
13 | <purpose> |
---|
14 | <para>Specifies the clock type to use when creating |
---|
15 | an object of type <classname>xtime</classname>.</para> |
---|
16 | </purpose> |
---|
17 | |
---|
18 | <description> |
---|
19 | <para>The only clock type supported by &Boost.Threads; is |
---|
20 | <code>TIME_UTC</code>. The epoch for <code>TIME_UTC</code> |
---|
21 | is 1970-01-01 00:00:00.</para> |
---|
22 | </description> |
---|
23 | </enum> |
---|
24 | |
---|
25 | <struct name="xtime"> |
---|
26 | <purpose> |
---|
27 | <simpara>An object of type <classname>xtime</classname> |
---|
28 | defines a time that is used to perform high-resolution time operations. |
---|
29 | This is a temporary solution that will be replaced by a more robust time |
---|
30 | library once available in Boost.</simpara> |
---|
31 | </purpose> |
---|
32 | |
---|
33 | <description> |
---|
34 | <simpara>The <classname>xtime</classname> type is used to represent a point on |
---|
35 | some time scale or a duration in time. This type may be proposed for the C standard by |
---|
36 | Markus Kuhn. &Boost.Threads; provides only a very minimal implementation of this |
---|
37 | proposal; it is expected that a full implementation (or some other time |
---|
38 | library) will be provided in Boost as a separate library, at which time &Boost.Threads; |
---|
39 | will deprecate its own implementation.</simpara> |
---|
40 | |
---|
41 | <simpara><emphasis role="bold">Note</emphasis> that the resolution is |
---|
42 | implementation specific. For many implementations the best resolution |
---|
43 | of time is far more than one nanosecond, and even when the resolution |
---|
44 | is reasonably good, the latency of a call to <code>xtime_get()</code> |
---|
45 | may be significant. For maximum portability, avoid durations of less than |
---|
46 | one second.</simpara> |
---|
47 | </description> |
---|
48 | |
---|
49 | <free-function-group name="creation"> |
---|
50 | <function name="xtime_get"> |
---|
51 | <type>int</type> |
---|
52 | |
---|
53 | <parameter name="xtp"> |
---|
54 | <paramtype><classname>xtime</classname>*</paramtype> |
---|
55 | </parameter> |
---|
56 | |
---|
57 | <parameter name="clock_type"> |
---|
58 | <paramtype>int</paramtype> |
---|
59 | </parameter> |
---|
60 | |
---|
61 | <postconditions> |
---|
62 | <simpara><code>xtp</code> represents the current point in |
---|
63 | time as a duration since the epoch specified by |
---|
64 | <code>clock_type</code>.</simpara> |
---|
65 | </postconditions> |
---|
66 | |
---|
67 | <returns> |
---|
68 | <simpara><code>clock_type</code> if successful, otherwise 0.</simpara> |
---|
69 | </returns> |
---|
70 | </function> |
---|
71 | </free-function-group> |
---|
72 | |
---|
73 | <data-member name="sec"> |
---|
74 | <type><emphasis>platform-specific-type</emphasis></type> |
---|
75 | </data-member> |
---|
76 | </struct> |
---|
77 | </namespace> |
---|
78 | </header> |
---|