summaryrefslogtreecommitdiffstats
path: root/stream/cache2.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/cache2.c')
-rw-r--r--stream/cache2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index 1337e44e37..671bd85c53 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -264,7 +264,7 @@ static int cache_execute_control(cache_vars_t *s) {
unsigned uint_res;
uint64_t uint64_res;
int needs_flush = 0;
- static unsigned last;
+ static double last;
int quit = s->control == -2;
uint64_t old_pos = s->stream->pos;
int old_eof = s->stream->eof;
@@ -275,7 +275,7 @@ static int cache_execute_control(cache_vars_t *s) {
s->control = -1;
return !quit;
}
- if (GetTimerMS() - last > 99) {
+ if (mp_time_sec() - last > 0.099) {
double len, pos;
if (s->stream->control(s->stream, STREAM_CTRL_GET_TIME_LENGTH, &len) == STREAM_OK)
s->stream_time_length = len;
@@ -296,7 +296,7 @@ static int cache_execute_control(cache_vars_t *s) {
return 0;
}
#endif
- last = GetTimerMS();
+ last = mp_time_sec();
}
if (s->control == -1) return 1;
switch (s->control) {