Mercury
mercury_time.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_TIME_H
12 #define MERCURY_TIME_H
13 
14 #include "mercury_util_config.h"
15 
16 typedef struct hg_time hg_time_t;
17 struct hg_time
18 {
19  long tv_sec;
20  long tv_usec;
21 };
22 
30 HG_UTIL_EXPORT int
32 
40 HG_UTIL_EXPORT double
42 
50 HG_UTIL_EXPORT hg_time_t
51 hg_time_from_double(double d);
52 
61 HG_UTIL_EXPORT int
63 
72 HG_UTIL_EXPORT hg_time_t
74 
83 HG_UTIL_EXPORT hg_time_t
85 
94 HG_UTIL_EXPORT int
95 hg_time_sleep(const hg_time_t rqt, hg_time_t *rmt);
96 
102 HG_UTIL_EXPORT char *
103 hg_time_stamp(void);
104 
105 #endif /* MERCURY_TIME_H */
HG_UTIL_EXPORT int hg_time_less(hg_time_t in1, hg_time_t in2)
Compare time values.
HG_UTIL_EXPORT int hg_time_sleep(const hg_time_t rqt, hg_time_t *rmt)
Sleep until the time specified in rqt has elapsed.
HG_UTIL_EXPORT hg_time_t hg_time_subtract(hg_time_t in1, hg_time_t in2)
Subtract time values.
HG_UTIL_EXPORT char * hg_time_stamp(void)
Get a string containing current time/date stamp.
HG_UTIL_EXPORT double hg_time_to_double(hg_time_t tv)
Convert hg_time_t to double.
HG_UTIL_EXPORT hg_time_t hg_time_from_double(double d)
Convert double to hg_time_t.
long tv_sec
Definition: mercury_time.h:19
HG_UTIL_EXPORT hg_time_t hg_time_add(hg_time_t in1, hg_time_t in2)
Add time values.
long tv_usec
Definition: mercury_time.h:20
HG_UTIL_EXPORT int hg_time_get_current(hg_time_t *tv)
Get an elapsed time on the calling processor.