VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oldTStamp.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef oldTStamp_H_
8 #define oldTStamp_H_
9 
10 #include <vlutil/vlTime.h>
11 
18 #define DtRELATIVE 0
19 #define DtABSOLUTE 1
20 
21 const double DtHourFracPerHour = 2147483648.0; /* (1L<<31) */
22 const double DtHourPerHourFrac = 1.0/2147483648.0; /* but SPARCcompiler
23  * chokes on that */
25 DT_DLL_VLPROTIND DtU32 DtMakeTimeStamp(DtTime time, int relativeOrAbs = DtRELATIVE);
26 
27 inline int DtAbsoluteHourFrac(DtU32 hourFrac) { return ((int)(hourFrac & 1)); }
28 inline DtU32 DtSetAbsoluteHourFrac(DtU32 hourFrac) { return hourFrac | 1; }
29 
30 inline double DtHourFrac2Hour(DtU32 hourFrac)
31 { return (hourFrac >> 1) * DtHourPerHourFrac; }
32 
33 inline double DtHourFrac2Sec(DtU32 hourFrac)
34 { return DtHourFrac2Hour(hourFrac) * DtHour2Sec; }
35 
36 inline DtU32 DtHour2HourFrac(double hour)
37 { return (DtU32)(hour * DtHourFracPerHour) << 1; }
38 
39 inline DtU32 DtSec2HourFrac(double sec)
40 { return DtHour2HourFrac(sec * DtSec2Hour); }
41 
42 #endif

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)