summaryrefslogtreecommitdiffstats
path: root/polyp/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/util.c')
-rw-r--r--polyp/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/polyp/util.c b/polyp/util.c
index eeb1d192..45e1b605 100644
--- a/polyp/util.c
+++ b/polyp/util.c
@@ -232,12 +232,12 @@ pa_usec_t pa_timeval_diff(const struct timeval *a, const struct timeval *b) {
b = c;
}
- r = (a->tv_sec - b->tv_sec)* 1000000;
+ r = ((pa_usec_t) a->tv_sec - b->tv_sec)* 1000000;
if (a->tv_usec > b->tv_usec)
- r += (a->tv_usec - b->tv_usec);
+ r += ((pa_usec_t) a->tv_usec - b->tv_usec);
else if (a->tv_usec < b->tv_usec)
- r -= (b->tv_usec - a->tv_usec);
+ r -= ((pa_usec_t) b->tv_usec - a->tv_usec);
return r;
}