Home | Libraries | People | FAQ | More |
boost::xtime —
An object of type xtime 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.
The xtime 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.
Note 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 xtime_get()
may be significant. For maximum portability, avoid durations of less than
one second.
xtime
creationint xtime_get(xtime* xtp, int clock_type);
Postconditions:
xtp
represents the current point in
time as a duration since the epoch specified by
clock_type
.
Returns:
clock_type
if successful, otherwise 0.
Copyright © 2001-2003 William E. Kempf |