GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > edspbs / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

TMR.xx-x86-gcc.c File Reference

Provides the implementation of the timing routines on a x86 using the GCC compiler. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <EDS/TMR.h>

Classes

struct  _TMR_parameters
 X86 specific constants for tick <=> nsecs conversion. More...

Typedefs

typedef struct _TMR_parameters TMR_parameters
 Typedef for struct _TMR_parameters.

Functions

int TMR_initialize (void)
 Initializes the TMR facility.
TMR_tick TMR_nsecs_to_ticks (int nanoseconds)
 Convert a number of nanoseconds to PTUs.
unsigned int TMR_ticks_to_nsecs (TMR_tick ticks)
 Convert a number of ticks to nanoseconds.
TMR_usecs_nsecs TMR_ticks_to_usecs_nsecs (TMR_tick ticks)
 Convert a number of ticks useconds.nanoseconds.
unsigned int TMR_frequency (void)
 Get the frequency of the processor timer.

Variables

static TMR_parameters TMR_Parameters = {0.0, 0.0}
 Holds the constants for the tick <-> nsecs conversion.


Detailed Description

Provides the implementation of the timing routines on a x86 using the GCC compiler.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: TMR.xx-x86-gcc.c,v 1.5 2011/03/25 22:16:57 russell Exp $

Function Documentation

unsigned int TMR_frequency ( void   ) 

Get the frequency of the processor timer.

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

References _TMR_parameters::frequency.

int TMR_initialize ( void   ) 

Initializes the TMR 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.

References _TMR_parameters::frequency, and _TMR_parameters::nsecs_per_tick.

int TMR_nsecs_to_ticks ( 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

References _TMR_parameters::frequency.

unsigned int TMR_ticks_to_nsecs ( TMR_tick  ticks  ) 

Convert a number of ticks to nanoseconds.

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

References _TMR_parameters::nsecs_per_tick.

TMR_usecs_nsecs TMR_ticks_to_usecs_nsecs ( TMR_tick  ticks  ) 

Convert a number of ticks useconds.nanoseconds.

Parameters:
ticks The number of ticks to convert
Returns:
The number of equivalent useconds, nanoseconds

References _TMR_usecs_nsecs::nsecs, _TMR_parameters::nsecs_per_tick, and _TMR_usecs_nsecs::usecs.


Generated on Fri Dec 9 16:27:10 2011 by  doxygen 1.5.8