\hypertarget{PTS_8h}{
\section{PTS.h File Reference}
\label{PTS_8h}\index{PTS.h@{PTS.h}}
}
Processor Timer Services. 


\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{PTS_8h_a0}{PTS\_\-initialize} (void)
\begin{CompactList}\small\item\em Initializes the PTS facility.\item\end{CompactList}\item 
int \hyperlink{PTS_8h_a1}{PTS\_\-nsecs\_\-to\_\-ptus} (int nanoseconds)
\begin{CompactList}\small\item\em Convert a number of nanoseconds to PTUs.\item\end{CompactList}\item 
int \hyperlink{PTS_8h_a2}{PTS\_\-ptus\_\-to\_\-nsecs} (int ptus)
\begin{CompactList}\small\item\em Convert a number of ptus to nanoseconds.\item\end{CompactList}\item 
int \hyperlink{PTS_8h_a3}{PTS\_\-frequency} (void)
\begin{CompactList}\small\item\em Get the frequency of the PTS clock.\item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Processor Timer Services.



\begin{Desc}
\item[Author: ]\par
JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}
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.



\subsection{Function Documentation}
\hypertarget{PTS_8h_a3}{
\index{PTS.h@{PTS.h}!PTS_frequency@{PTS\_\-frequency}}
\index{PTS_frequency@{PTS\_\-frequency}!PTS.h@{PTS.h}}
\subsubsection[PTS\_\-frequency]{\setlength{\rightskip}{0pt plus 5cm}int PTS\_\-frequency (void)}}
\label{PTS_8h_a3}


Get the frequency of the PTS clock.

\begin{Desc}
\item[Returns: ]\par
The frequency, in Hertz, to the processor clock \end{Desc}
\hypertarget{PTS_8h_a0}{
\index{PTS.h@{PTS.h}!PTS_initialize@{PTS\_\-initialize}}
\index{PTS_initialize@{PTS\_\-initialize}!PTS.h@{PTS.h}}
\subsubsection[PTS\_\-initialize]{\setlength{\rightskip}{0pt plus 5cm}void PTS\_\-initialize (void)}}
\label{PTS_8h_a0}


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. \hypertarget{PTS_8h_a1}{
\index{PTS.h@{PTS.h}!PTS_nsecs_to_ptus@{PTS\_\-nsecs\_\-to\_\-ptus}}
\index{PTS_nsecs_to_ptus@{PTS\_\-nsecs\_\-to\_\-ptus}!PTS.h@{PTS.h}}
\subsubsection[PTS\_\-nsecs\_\-to\_\-ptus]{\setlength{\rightskip}{0pt plus 5cm}int PTS\_\-nsecs\_\-to\_\-ptus (int {\em nanoseconds})}}
\label{PTS_8h_a1}


Convert a number of nanoseconds to PTUs.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
nanoseconds}]The number of nanoseconds to convert to PTUs \end{description}
\end{Desc}
\begin{Desc}
\item[Returns: ]\par
The number of equivalent PTUs \end{Desc}
\hypertarget{PTS_8h_a2}{
\index{PTS.h@{PTS.h}!PTS_ptus_to_nsecs@{PTS\_\-ptus\_\-to\_\-nsecs}}
\index{PTS_ptus_to_nsecs@{PTS\_\-ptus\_\-to\_\-nsecs}!PTS.h@{PTS.h}}
\subsubsection[PTS\_\-ptus\_\-to\_\-nsecs]{\setlength{\rightskip}{0pt plus 5cm}int PTS\_\-ptus\_\-to\_\-nsecs (int {\em ptus})}}
\label{PTS_8h_a2}


Convert a number of ptus to nanoseconds.

\begin{Desc}
\item[Parameters: ]\par
\begin{description}
\item[{\em 
ptus}]The number of PTUs to convert to nanoseconds \end{description}
\end{Desc}
\begin{Desc}
\item[Returns: ]\par
The number of equivalent PTUs \end{Desc}
