time: Fix another subtle FP issue in split_s_us

The us part wasn't actually truncated properly.
pull/9645/head
NiLuJe 2 years ago
parent 318d0e0ff0
commit 82b5f64178

@ -171,7 +171,7 @@ end
function time.split_s_us(time_fts)
if not time_fts then return nil, nil end
local sec = math.floor(time_fts * FTS2S)
local usec = math.floor(time_fts - sec * S2FTS) * FTS2US
local usec = math.floor((time_fts - sec * S2FTS) * FTS2US)
-- Seconds and µs
return sec, usec
end

Loading…
Cancel
Save