summaryrefslogtreecommitdiffstats
path: root/player/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua.c')
-rw-r--r--player/lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/lua.c b/player/lua.c
index dec5d22cab..edd01c0c73 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -722,7 +722,8 @@ static int script_get_mouse_pos(lua_State *L)
static int script_get_time(lua_State *L)
{
- lua_pushnumber(L, mp_time_sec());
+ struct script_ctx *ctx = get_ctx(L);
+ lua_pushnumber(L, mpv_get_time_us(ctx->client) / (double)(1000 * 1000));
return 1;
}