summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-stream.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 16:38:09 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 16:38:09 +0000
commit687e2d7da5d55784bf0769774be7296254a08eba (patch)
treedb91958b67bfcc339d11d88b43036a76e46c296d /polyp/polyplib-stream.c
parent70710e14d8f8bbab4f1a42db4993f27cb2ca7bc5 (diff)
Abstract the gettimeofday call into a utility function to ease porting.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@366 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-stream.c')
-rw-r--r--polyp/polyplib-stream.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/polyp/polyplib-stream.c b/polyp/polyplib-stream.c
index 440217e7..d4480f8c 100644
--- a/polyp/polyplib-stream.c
+++ b/polyp/polyplib-stream.c
@@ -217,7 +217,7 @@ static void ipol_callback(struct pa_mainloop_api *m, struct pa_time_event *e, co
s->ipol_requested = 1;
}
- gettimeofday(&tv2, NULL);
+ pa_gettimeofday(&tv2);
pa_timeval_add(&tv2, LATENCY_IPOL_INTERVAL_USEC);
m->time_restart(e, &tv2);
@@ -256,7 +256,7 @@ void pa_create_stream_callback(struct pa_pdispatch *pd, uint32_t command, uint32
struct timeval tv;
pa_operation_unref(pa_stream_get_latency_info(s, NULL, NULL));
- gettimeofday(&tv, NULL);
+ pa_gettimeofday(&tv);
tv.tv_usec += LATENCY_IPOL_INTERVAL_USEC; /* every 100 ms */
assert(!s->ipol_event);
@@ -412,7 +412,7 @@ static void stream_get_latency_info_callback(struct pa_pdispatch *pd, uint32_t c
pa_context_fail(o->context, PA_ERROR_PROTOCOL);
goto finish;
} else {
- gettimeofday(&now, NULL);
+ pa_gettimeofday(&now);
if (pa_timeval_cmp(&local, &remote) < 0 && pa_timeval_cmp(&remote, &now)) {
/* local and remote seem to have synchronized clocks */
@@ -470,7 +470,7 @@ struct pa_operation* pa_stream_get_latency_info(struct pa_stream *s, void (*cb)(
pa_tagstruct_putu32(t, tag = s->context->ctag++);
pa_tagstruct_putu32(t, s->channel);
- gettimeofday(&now, NULL);
+ pa_gettimeofday(&now);
pa_tagstruct_put_timeval(t, &now);
pa_tagstruct_putu64(t, s->counter);
@@ -581,7 +581,7 @@ struct pa_operation* pa_stream_cork(struct pa_stream *s, int b, void (*cb) (stru
s->ipol_usec = pa_stream_get_interpolated_time(s);
else if (s->corked && !b)
/* Unpausing */
- gettimeofday(&s->ipol_timestamp, NULL);
+ pa_gettimeofday(&s->ipol_timestamp);
}
s->corked = b;