GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

TSS.c File Reference

Implements routines that manipulate a timespec structure. More...

#include <stdlib.h>
#include <PBS/TOV.h>
#include <PBS/TSS.h>
#include <PBS/WCT.h>
#include <WCT_pvtdefs.ih>

Defines

#define get_time()   WCT_get()
 Gets the time in the local representation.
#define NSECS_IN_A_SECOND   (1000 * 1000 * 1000)
 Convenience symbol for a billion.

Functions

TSS_timespec TSS_nsecxTOtodAdd (long long int delta)
 Computes the time specification by adding a number of nanoseconds to the current time.
TSS_timespec TSS_nsecsTOtodAdd (unsigned int delta)
 Computes the time specification by adding a number of nanoseconds to the current time.
TSS_timespec TSS_usecsTOtodAdd (unsigned int delta)
 Computes the time specification by adding a number of microseconds to the current time.
TSS_timespec TSS_secsTOtodAdd (unsigned int delta)
 Computes the time specification by adding a number of seconds to the current time.
TSS_timespec TSS_from_wct (WCT_time wct)
 Converts a Wall Clock Time to a struct timespec.


Detailed Description

Implements routines that manipulate a timespec structure.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: TSS.c,v 1.6 2011/03/24 23:05:46 apw Exp $

A timespec structure is a standard structure found in the "C"/Unix world. It represents time as two fields in a structure, a seconds field and a microseconds field. Performing simple operations, such as addition and subtraction, is not completely trivial, so this file provides a set of standard manipulation routines.


Function Documentation

TSS_timespec TSS_from_wct ( WCT_time  wct  ) 

Converts a Wall Clock Time to a struct timespec.

Parameters:
wct The Wall Clock Time to convert
Returns:
The TimeOut Value

References NSECS_IN_A_SECOND.

Referenced by TOV_from_wct().

TSS_timespec TSS_nsecsTOtodAdd ( unsigned int  delta  ) 

Computes the time specification by adding a number of nanoseconds to the current time.

Parameters:
delta The number of microeconds to add to the current time.
Return values:
The new time returned as a timespec structure.

References get_time, and NSECS_IN_A_SECOND.

Referenced by TOV_from_nsecs().

TSS_timespec TSS_nsecxTOtodAdd ( long long int  delta  ) 

Computes the time specification by adding a number of nanoseconds to the current time.

Parameters:
delta The number of microeconds to add to the current time.
Return values:
The new time returned as a timespec structure.

References get_time, and NSECS_IN_A_SECOND.

Referenced by TOV_from_nsecx().

TSS_timespec TSS_secsTOtodAdd ( unsigned int  delta  ) 

Computes the time specification by adding a number of seconds to the current time.

Parameters:
delta The number of seconds to add to the current time.
Return values:
The new time returned as a timespec structure.

References get_time, and NSECS_IN_A_SECOND.

Referenced by TOV_from_secs().

TSS_timespec TSS_usecsTOtodAdd ( unsigned int  delta  ) 

Computes the time specification by adding a number of microseconds to the current time.

Parameters:
delta The number of microeconds to add to the current time.
Return values:
The new time returned as a timespec structure.

References get_time, and NSECS_IN_A_SECOND.

Referenced by TOV_from_usecs().


Generated on Mon Aug 1 14:54:45 2011 by  doxygen 1.5.8