GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / dev > pbs / mv2304
#include <PBS/impl/SPIN_time.h.xx-ppc-gcc>
#include <PBS/impl/PTS.h.xx-ppc-gcc>
Defines | |
#define | SPIN_PTUS_TO_NSECS(_ptus) PTS_PTUS_TO_NSECS(_ptus) |
Converts a short range processor spin time to nanoseconds. | |
#define | SPIN_NSECS_TO_PTUS(_nsecs) PTS_NSECS_TO_PTUS(_nsecs) |
Converts a short range nanoseconds to a processor spin time. | |
Functions | |
SPIN__EXP_FNC SPIN_time | SPIN__curtime (void) |
Returns the current time in units of PTUs. | |
SPIN__EXP_FNC unsigned int | SPIN__nsecs_to_ptus (unsigned int nsecs) |
Converts a number of nanoseconds to PTUs. | |
SPIN__EXP_FNC unsigned int | SPIN__ptus_to_nsecs (unsigned int ptus) |
CVS $Id: SPIN.ih.xx-ppc-gcc,v 1.5 2011/03/24 23:05:45 apw Exp $
ABSTRACT
Provides a PPC independent way of spinning for a specified number of nanoseconds. These routines are provided in the form of inline functions. They use the time base registers as the timing mechanism. These have resolutions on the order of 4 x the memory speed (ie ~60nanoseconds). See the generic interface file 'SPIN.ih' for documentation.
#define SPIN_NSECS_TO_PTUS | ( | _nsecs | ) | PTS_NSECS_TO_PTUS(_nsecs) |
Converts a short range nanoseconds to a processor spin time.
_nsecs | The short range time, in nanoseconds, to convert to a processor time. |
Referenced by SPIN__nsecs_to_ptus().
#define SPIN_PTUS_TO_NSECS | ( | _ptus | ) | PTS_PTUS_TO_NSECS(_ptus) |
Converts a short range processor spin time to nanoseconds.
_ptus | The short range processor spin time to convert. |
Referenced by SPIN__ptus_to_nsecs().
SPIN__EXP_FNC SPIN_time SPIN__curtime | ( | void | ) |
Returns the current time in units of PTUs.
The | current time in units of PTUs. |
The customary use of this routine is to strobe the starting time, then use the return value along with SPIN__check() or SPIN__wait() to allow a specified amount of time to elapsed from the starting time.
SPIN__EXP_FNC unsigned int SPIN__nsecs_to_ptus | ( | unsigned int | nsecs | ) |
Converts a number of nanoseconds to PTUs.
nsecs | The number of nanoseconds to convert to a PTUs |
References SPIN_NSECS_TO_PTUS.
SPIN__EXP_FNC unsigned int SPIN__ptus_to_nsecs | ( | unsigned int | ptus | ) |
ptus | The number of PTUs to convert to nanoseconds |
References SPIN_PTUS_TO_NSECS.