File: xtime-ref.xml

package info (click to toggle)
boost 1.33.1-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 100,948 kB
  • ctags: 145,103
  • sloc: cpp: 573,492; xml: 49,055; python: 15,626; ansic: 13,588; sh: 2,099; yacc: 858; makefile: 660; perl: 427; lex: 111; csh: 6
file content (78 lines) | stat: -rw-r--r-- 2,761 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
  "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd" [
  <!ENTITY % threads.entities SYSTEM "entities.xml">
  %threads.entities;
]>
<header name="boost/thread/xtime.hpp"
  last-revision="$Date: 2004/07/17 04:33:59 $">
  <namespace name="boost">
    <enum name="xtime_clock_types">
		<enumvalue name="TIME_UTC" />

		<purpose>
			<para>Specifies the clock type to use when creating
			an object of type <classname>xtime</classname>.</para>
		</purpose>

		<description>
			<para>The only clock type supported by &Boost.Threads; is 
			<code>TIME_UTC</code>. The epoch for <code>TIME_UTC</code>
			is 1970-01-01 00:00:00.</para>
		</description>
	</enum>

    <struct name="xtime">
		<purpose>
			<simpara>An object of type <classname>xtime</classname>
			defines a time that is used to perform high-resolution time operations.
			This is a temporary solution that will be replaced by a more robust time 
			library once available in Boost.</simpara>
		</purpose>

		<description>
			<simpara>The <classname>xtime</classname> type is used to represent a point on 
			some time scale or a duration in time. This type may be proposed for the C standard by 
			Markus Kuhn. &Boost.Threads; provides only a very minimal implementation of this
			proposal; it is expected that a full implementation (or some other time
			library) will be provided in Boost as a separate library, at which time &Boost.Threads;
			will deprecate its own implementation.</simpara>
			
			<simpara><emphasis role="bold">Note</emphasis> that the resolution is 
			implementation specific. For many implementations the best resolution 
			of time is far more than one nanosecond, and even when the resolution 
			is reasonably good, the latency of a call to <code>xtime_get()</code>
			may be significant. For maximum portability, avoid durations of less than
			one second.</simpara>
		</description>

		<free-function-group name="creation">
			<function name="xtime_get">
				<type>int</type>
				
				<parameter name="xtp">
					<paramtype><classname>xtime</classname>*</paramtype>
				</parameter>

				<parameter name="clock_type">
					<paramtype>int</paramtype>
				</parameter>
				
				<postconditions>
					<simpara><code>xtp</code> represents the current point in
					time as a duration since the epoch specified by
					<code>clock_type</code>.</simpara>
				</postconditions>
				
				<returns>
					<simpara><code>clock_type</code> if successful, otherwise 0.</simpara>
				</returns>
			</function>
		</free-function-group>

		<data-member name="sec">
			<type><emphasis>platform-specific-type</emphasis></type>
		</data-member>
	</struct>
  </namespace>
</header>