nidas  v1.2-1520
time_constants.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2011, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 /*
27 
28  Macro values for time conversions.
29 
30 */
31 
32 #ifndef NIDAS_UTIL_TIMECONSTANTS_H
33 #define NIDAS_UTIL_TIMECONSTANTS_H
34 
35 #ifndef SECS_PER_HOUR
36 #define SECS_PER_HOUR 3600
37 #endif
38 
39 #ifndef SECS_PER_DAY
40 #define SECS_PER_DAY 86400
41 #endif
42 
43 #ifndef MSECS_PER_SEC
44 #define MSECS_PER_SEC 1000
45 #endif
46 
47 #ifndef MSECS_PER_DAY
48 #define MSECS_PER_DAY 86400000
49 #define MSECS_PER_HALF_DAY 43200000
50 #endif
51 
52 /* Some NIDAS driver modules report time in 1/10 milliseconds */
53 #ifndef TMSECS_PER_SEC
54 #define TMSECS_PER_SEC 10000
55 #endif
56 
57 #ifndef TMSECS_PER_DAY
58 #define TMSECS_PER_DAY 864000000
59 #define TMSECS_PER_HALF_DAY 432000000
60 #endif
61 
62 #ifndef USECS_PER_TMSEC
63 #define USECS_PER_TMSEC 100
64 #endif
65 
66 #ifndef USECS_PER_MSEC
67 #define USECS_PER_MSEC 1000
68 #endif
69 
70 #ifndef USECS_PER_SEC
71 #define USECS_PER_SEC 1000000
72 #endif
73 
74 #ifndef USECS_PER_HOUR
75 #define USECS_PER_HOUR 3600000000LL
76 #endif
77 
78 #ifndef USECS_PER_DAY
79 #define USECS_PER_DAY 86400000000LL
80 #define USECS_PER_HALF_DAY 43200000000LL
81 #endif
82 
83 #ifndef NSECS_PER_USEC
84 #define NSECS_PER_USEC 1000
85 #endif
86 
87 #ifndef NSECS_PER_TMSEC
88 #define NSECS_PER_TMSEC 100000
89 #endif
90 
91 #ifndef NSECS_PER_MSEC
92 #define NSECS_PER_MSEC 1000000
93 #endif
94 
95 #ifndef NSECS_PER_SEC
96 #define NSECS_PER_SEC 1000000000
97 #endif
98 
99 #endif