12345678910111213141516171819202122232425262728293031323334353637 |
- // dbghlp.h :
- //
- #if !defined(AGD_DBGHLP_H__43902563_76A4_4ADC_8FA2_DD924EAAA095__INCLUDED_)
- #define AGD_DBGHLP_H__43902563_76A4_4ADC_8FA2_DD924EAAA095__INCLUDED_
- #include <stdint.h>
- #include <stdbool.h>
- #include <time.h>
- #ifdef __cplusplus
- extern "C" {
- #endif // __cplusplus
- /////////////////////////////////////////////////////////////////////////////
- // dbghlp.h - Declarations:
- #ifdef _DEBUG
- #define TRACE(...) printf(__VA_ARGS__), fflush(stdout)
- #else // _DEBUG
- #define TRACE(...)
- #endif // _DEBUG
- /////////////////////////////////////////////////////////////////////////////
- uint64_t Timeval2Us(const struct timeval *ptv);
- const struct timeval* Us2Timeval(uint64_t usTime, struct timeval *ptv);
- uint64_t Timespec2Ns(const struct timespec *pts);
- const struct timespec* Ns2Timespec(uint64_t nsTime, struct timespec *pts);
- int64_t TimespecDiff(const struct timespec *pts1, const struct timespec *pts2);
- void GetTimespec(struct timespec *pts);
- /////////////////////////////////////////////////////////////////////////////
- #ifdef __cplusplus
- }
- #endif // __cplusplus
- #endif // !defined(AGD_DBGHLP_H__43902563_76A4_4ADC_8FA2_DD924EAAA095__INCLUDED_)
|