Fix timer initialization.

This fixes the problem that the first timer tick is an
overrun and causes all timers to expire immediately.

replaces #4003
This commit is contained in:
Auke Kok 2016-04-19 15:47:14 -07:00 committed by Nils Dagsson Moskopp
parent ee08952a2e
commit 807cec58aa
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
local jobs = {}
local time = 0.0
local last = 0.0
local last = core.get_us_time() / 1000000
core.register_globalstep(function(dtime)
local new = core.get_us_time() / 1000000