GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel4-32
#include <PBS/WCT.h>
Defines | |
#define | TOV_K_NSECS_IN_A_SEC (1000 * 1000 * 1000) |
Convenience symbol defining the number of nanoseconds in a second. | |
Typedefs | |
typedef TOV(* | TOV_cvt_s )(unsigned int delta) |
Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV. | |
typedef TOV(* | TOV_cvt_x )(long long int delta) |
Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV. | |
Functions | |
TOV | TOV_add_nsecx (TOV tov, signed long long int dnsecx) |
Returns the timeout value delta nanoseconds from the specified tov. | |
TOV | TOV_add_nsecs (TOV tov, unsigned int dnsecs) |
Returns the timeout value delta nanoseconds from the specified tov. | |
TOV | TOV_from_nsecx (long long int dnsecx) |
Returns the timeout value dsecx nanoseconds from the current time. | |
TOV | TOV_from_nsecs (unsigned int dnsecs) |
Returns the timeout value dnsecs nanoseconds from the current time. | |
TOV | TOV_from_usecs (unsigned int dusecs) |
Returns the timeout value delta microseconds from the current time. | |
TOV | TOV_from_secs (unsigned int dsecs) |
Returns the timeout value dsecs seconds from the current time. | |
TOV | TOV_from_wct (WCT_time atime) |
Returns the timeout value corresponding to the specified Wall Clock Time wct. |
CVS $Id: TOV.h,v 1.5 2011/03/24 23:05:44 apw Exp $
Provides a set of utility functions to define a timeout time. The timeout is always given in terms of absolute time, but the exact specification is platform dependent.
Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.
All timeouts must eventually be expressed as a TOV. The exact representation of this is platform dependent. Most code would like to specify a timeout in natural delta units, like seconds, micro-seconds, nano-seconds. A feature of a TOV is that, on some systems, it is an absolute time. Therefore, the conversion from a delta units to a TOV must be done when the blocking operation to be timed out is posted. That is, no cannot precompute the timeout value and store it for latter use. In this case, one stores the delta unit and a pointer to a function that can implement the conversion.
The timeout period to be converted is expressed as unsigned int. If a longer timeout period is needed, consider TOV_cvt_x, for the larger range, a 64-bit signed delta.
In most cases, the converter will be one of the TOV routines, although nothing prohibits the user from providing his own.
Signature of a function to convert a timeout value in arbitrary units (but known to the converter) to a TOV.
All timeouts must eventually be expressed as a TOV. The exact representation of this is platform dependent. Most code would like to specify a timeout in natural delta units, like seconds, micro-seconds, nano-seconds. A feature of a TOV is that, on some systems, it is an absolute time. Therefore, the conversion from a delta units to a TOV must be done when the blocking operation to be timed out is posted. That is, no cannot precompute the timeout value and store it for latter use. In this case, one stores the delta unit and a pointer to a function that can implement the conversion.
The timeout period to be converted is expressed as signed long long value. This is gives an extended range necessary for very long timeouts. If a smaller range is all that is necessary, consider TOV_cvt_s.
In most cases, the converter will be one of the TOV routines, although nothing prohibits the user from providing his own.
Returns the timeout value delta nanoseconds from the specified tov.
tov | The TOV to add to | |
dnsecs | The number of nanoseconds to add. |
The | timeout value delta nanoseconds from tov. |
References NSECS_IN_A_SECOND, _TOV_u::tov, and _TOV_u::ts.
Returns the timeout value delta nanoseconds from the specified tov.
tov | The TOV to add to | |
dnsecx | The number of nanoseconds to add. |
The | timeout value delta nanoseconds from tov. |
References NSECS_IN_A_SECOND, _TOV_u::tov, and _TOV_u::ts.
Referenced by WUT_keepalive_rtn().
TOV TOV_from_nsecs | ( | unsigned int | dnsecs | ) |
Returns the timeout value dnsecs nanoseconds from the current time.
dnsecs | The delta time in nanoseconds |
The | timeout value dnsecs nanoseconds from the current time. |
References _TOV_u::tov, _TOV_u::ts, and TSS_nsecsTOtodAdd().
Referenced by TASK_pause(), WUT_sys_connect(), and wut_sys_shutdown().
TOV TOV_from_nsecx | ( | long long int | dnsecx | ) |
Returns the timeout value dsecx nanoseconds from the current time.
dnsecx | The delta time in extended nanoseconds. |
The | timeout value delta nanoseconds from the current time. |
References _TOV_u::tov, _TOV_u::ts, and TSS_nsecxTOtodAdd().
TOV TOV_from_secs | ( | unsigned int | dsecs | ) |
Returns the timeout value dsecs seconds from the current time.
dsecs | The delta time in seconds. |
The | timeout value dsecs seconds from the current time. |
References _TOV_u::tov, _TOV_u::ts, and TSS_secsTOtodAdd().
TOV TOV_from_usecs | ( | unsigned int | dusecs | ) |
Returns the timeout value delta microseconds from the current time.
dusecs | The delta time in microseconds. |
The | timeout value usecs microseconds from the current time. |
References _TOV_u::tov, _TOV_u::ts, and TSS_usecsTOtodAdd().
Returns the timeout value corresponding to the specified Wall Clock Time wct.
wct | The Wall Clock Time to convert to a TOV. |
The | corresponding TOV |
References _TOV_u::tov, _TOV_u::ts, TSS_from_wct(), and WCT_K_UTB_OFFSET_IN_SECS.