summaryrefslogtreecommitdiffstats
path: root/src/pulse/timeval.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/timeval.h')
-rw-r--r--src/pulse/timeval.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/pulse/timeval.h b/src/pulse/timeval.h
index 2b3faf16..48c6cdb3 100644
--- a/src/pulse/timeval.h
+++ b/src/pulse/timeval.h
@@ -40,16 +40,19 @@ PA_C_DECL_BEGIN
#define PA_USEC_PER_SEC ((pa_usec_t) 1000000ULL)
/** The number of nanoseconds in a second */
-#define PA_NSEC_PER_SEC ((pa_usec_t) 1000000000ULL)
+#define PA_NSEC_PER_SEC ((unsigned long long) 1000000000ULL)
/** The number of microseconds in a millisecond */
#define PA_USEC_PER_MSEC ((pa_usec_t) 1000ULL)
/** The number of nanoseconds in a millisecond */
-#define PA_NSEC_PER_MSEC ((pa_usec_t) 1000000ULL)
+#define PA_NSEC_PER_MSEC ((unsigned long long) 1000000ULL)
/** The number of nanoseconds in a microsecond */
-#define PA_NSEC_PER_USEC ((pa_usec_t) 1000ULL)
+#define PA_NSEC_PER_USEC ((unsigned long long) 1000ULL)
+
+/** Invalid time in usec */
+#define PA_USEC_INVALID ((pa_usec_t) -1)
struct timeval;
@@ -60,7 +63,7 @@ struct timeval *pa_gettimeofday(struct timeval *tv);
* structs. */
pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) PA_GCC_PURE;
-/** Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwse */
+/** Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwise */
int pa_timeval_cmp(const struct timeval *a, const struct timeval *b) PA_GCC_PURE;
/** Return the time difference between now and the specified timestamp */