XTIME Clocks

Section: TIME Extension (3)
Updated: 2007-08-30
Index Return to Main Contents
 

NAME

XtimeCreateClock, XtimeFreeClock, XtimeStartClock, XtimeStopClock, XtimeClockGetTime - Clock functions.  

SYNTAX

#include <X11/extensions/Xtime.h>

XtimeClock XtimeCreateClock(Display *display, unsigned int rate, int initial_value);

void XtimeFreeClock(Display *display, XtimeClock clock);

void XtimeStartClock(Display *display, XtimeClock clock);

void XtimeStopClock(Display *display, XtimeClock clock);

uint32_t XtimeClockGetTime(Display *display, XtimeClock clock);

 

ARGUMENTS

display
Specifies the connection to the X server.
clock
Server-side clock.
rate
Tick rate of the clock.
initial_value
Initial value of the clock.

 

DESCRIPTION

The XtimeCreateClock function creates a server-side clock with a given tick rate and starting value. The XtimeFreeClock function frees a previously created clock. rate may not be zero.

Clocks can be started and stopped using the XtimeStartClock and XtimeStopClock functions. When started, a clock progresses at the rate given at creation time. Starting a clock that is already running or stopping a clock that is not runnning has no effect. The time value is subject to 32-bit wrap-around. Upon creation clocks are initially in the "stopped" state.

Applications can inquire the current time represented by a clock using the XtimeClockGetTime function.

 

RETURN VALUE

The XtimeClockGetTime function returns the current time as an unsigned 32-bit value.

 

BUGS

Applications may request arbitrarily high clock rates, but implementations are not required to provide them. Since there is no way to inquire the maximum supported clock rate, applications should be conservative and choose a rate that makes sense for their purposes. Due to limitations of human perception there should never be a reason to create sub-millisecond timers.

 

SEE ALSO

XtimeQueryExtension(3), XtimeCreateScheduler(3)


 

Index

NAME
SYNTAX
ARGUMENTS
DESCRIPTION
RETURN VALUE
BUGS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 13:14:25 GMT, January 31, 2008