summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-10-20 18:00:44 +0200
committersfan5 <sfan5@live.de>2023-10-21 11:07:59 +0200
commit2569c69d92b06a234ba734e60d20422e99f7babe (patch)
tree70bbc20bc022bfab6eefda51105fa069c7a11048 /stream
parentd7683ec4acf408eec9b70f551d66664ca14c7b70 (diff)
downloadmpv-2569c69d92b06a234ba734e60d20422e99f7babe.tar.bz2
mpv-2569c69d92b06a234ba734e60d20422e99f7babe.tar.xz
dvb_tune: remove use of time()
Diffstat (limited to 'stream')
-rw-r--r--stream/dvb_tune.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c
index a1d85bb3d3..7731a4cbf7 100644
--- a/stream/dvb_tune.c
+++ b/stream/dvb_tune.c
@@ -30,12 +30,12 @@
#include <poll.h>
#include <unistd.h>
#include <fcntl.h>
-#include <time.h>
#include <errno.h>
#include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h>
#include "osdep/io.h"
+#include "osdep/timer.h"
#include "dvbin.h"
#include "dvb_tune.h"
#include "common/msg.h"
@@ -289,13 +289,13 @@ static int check_status(dvb_priv_t *priv, int fd_frontend, int tmout)
fe_status_t festatus;
struct pollfd pfd[1];
int ok = 0, locks = 0;
- time_t tm1, tm2;
+ int tm1, tm2;
pfd[0].fd = fd_frontend;
pfd[0].events = POLLPRI;
MP_VERBOSE(priv, "Getting frontend status\n");
- tm1 = tm2 = time((time_t *) NULL);
+ tm1 = tm2 = (int)mp_time_sec();
while (!ok) {
festatus = 0;
if (poll(pfd, 1, tmout * 1000) > 0) {
@@ -307,7 +307,7 @@ static int check_status(dvb_priv_t *priv, int fd_frontend, int tmout)
}
}
usleep(10000);
- tm2 = time((time_t *) NULL);
+ tm2 = (int)mp_time_sec();
if ((festatus & FE_TIMEDOUT) || (locks >= 2) || (tm2 - tm1 >= tmout))
ok = 1;
}