Skip to content

Commit

Permalink
Fix timer initialization.
Browse files Browse the repository at this point in the history
This fixes the problem that the first timer tick is an
overrun and causes all timers to expire immediately.

replaces #4003
  • Loading branch information
sofar authored and paramat committed Apr 21, 2016
1 parent 8cf26bb commit a60aa8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/game/misc.lua
Expand Up @@ -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
Expand Down

0 comments on commit a60aa8e

Please sign in to comment.