Main Page   Interface   Data Structures   File List   Data Fields   Globals  

PTS.h File Reference

Processor Timer Services. More...


Functions

void PTS_initialize (void)
 Initializes the PTS facility. More...

int PTS_nsecs_to_ptus (int nanoseconds)
 Convert a number of nanoseconds to PTUs. More...

int PTS_ptus_to_nsecs (int ptus)
 Convert a number of ptus to nanoseconds. More...

int PTS_frequency (void)
 Get the frequency of the PTS clock. More...


Detailed Description

Processor Timer Services.

Author:
JJRussell - russell@slac.stanford.edu
These utilities allow one to deal with the highest resolution clock available on the target platform. The utilities which deal with the clock all take times in the units of the processor clock. These routines allow one to convert these units to and from physical units.

Nanoseconds has been chosen as the physical unit to deal in. The only limitation that this imposes is on the range, limiting these times, at least in 32 bit representations to the 2-4 second range.


Function Documentation

int PTS_frequency void   
 

Get the frequency of the PTS clock.

Returns:
The frequency, in Hertz, to the processor clock

void PTS_initialize void   
 

Initializes the PTS facility.

This is a one time only call to initialize internal data structures. This routine should be called as part of the library initialization sequence.

int PTS_nsecs_to_ptus int    nanoseconds
 

Convert a number of nanoseconds to PTUs.

Parameters:
nanoseconds  The number of nanoseconds to convert to PTUs
Returns:
The number of equivalent PTUs

int PTS_ptus_to_nsecs int    ptus
 

Convert a number of ptus to nanoseconds.

Parameters:
ptus  The number of PTUs to convert to nanoseconds
Returns:
The number of equivalent PTUs


Generated on Fri Mar 1 16:55:29 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001