Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/thread/doc/xtime-ref.xml @ 35

Last change on this file since 35 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

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