diff options
Diffstat (limited to 'pjlib/include/pj/types.h')
-rw-r--r-- | pjlib/include/pj/types.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pjlib/include/pj/types.h b/pjlib/include/pj/types.h index 69d440a9..6f86895e 100644 --- a/pjlib/include/pj/types.h +++ b/pjlib/include/pj/types.h @@ -120,6 +120,30 @@ struct pj_str_t pj_ssize_t slen; }; +/** + * This structure represents high resolution (64bit) time value. The time + * values represent time in cycles, which is retrieved by calling + * #pj_get_timestamp(). + */ +typedef union pj_timestamp +{ + struct + { +#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0 + pj_uint32_t lo; /**< Low 32-bit value of the 64-bit value. */ + pj_uint32_t hi; /**< high 32-bit value of the 64-bit value. */ +#else + pj_uint32_t hi; /**< high 32-bit value of the 64-bit value. */ + pj_uint32_t lo; /**< Low 32-bit value of the 64-bit value. */ +#endif + } u32; /**< The 64-bit value as two 32-bit values. */ + +#if PJ_HAS_INT64 + pj_uint64_t u64; /**< The whole 64-bit value, where available. */ +#endif +} pj_timestamp; + + /** * The opaque data type for linked list, which is used as arguments throughout |