#include "mercury_util_config.h"
Go to the source code of this file.
HG_UTIL_EXPORT int hg_time_get_current |
( |
hg_time_t * |
tv | ) |
|
Get an elapsed time on the calling processor.
- Parameters
-
tv | [OUT] pointer to returned time structure |
- Returns
- Non-negative on success or negative on failure
HG_UTIL_EXPORT double hg_time_to_double |
( |
hg_time_t |
tv | ) |
|
Convert hg_time_t to double.
- Parameters
-
- Returns
- Converted time in seconds
HG_UTIL_EXPORT hg_time_t hg_time_from_double |
( |
double |
d | ) |
|
Convert double to hg_time_t.
- Parameters
-
- Returns
- Converted time structure
Compare time values.
- Parameters
-
in1 | [IN] time structure |
in2 | [IN] time structure |
- Returns
- 1 if in1 < in2, 0 otherwise
Add time values.
- Parameters
-
in1 | [IN] time structure |
in2 | [IN] time structure |
- Returns
- Summed time structure
Subtract time values.
- Parameters
-
in1 | [IN] time structure |
in2 | [IN] time structure |
- Returns
- Subtracted time structure
Sleep until the time specified in rqt has elapsed.
- Parameters
-
reqt | [IN] time structure |
rmt | [OUT] pointer to time structure |
- Returns
- Non-negative on success or negative on failure
HG_UTIL_EXPORT char* hg_time_stamp |
( |
void |
| ) |
|
Get a string containing current time/date stamp.
- Returns
- Valid string or NULL on failure