plugins/hiscore: use emu.time (nw)

This commit is contained in:
cracyc 2019-02-17 14:00:15 -06:00
parent a0ca95fa28
commit 11c3b63c41

View File

@ -60,9 +60,9 @@ function hiscore.startplugin()
local function parse_table ( dsting )
local _table = {};
for line in string.gmatch(dsting, '([^\n]+)') do
local delay = line:match('^@delay=([%d])')
local delay = line:match('^@delay=([.%d]*)')
if delay and #delay > 0 then
delaytime = os.time() + tonumber(delay)
delaytime = emu.time() + tonumber(delay)
else
local cpu, mem;
local cputag, space, offs, len, chk_st, chk_ed, fill = string.match(line, '^@([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),?(%x?%x?)');
@ -217,7 +217,7 @@ function hiscore.startplugin()
local function init ()
if not scores_have_been_read then
if (delaytime <= os.time()) and check_mem( positions ) then
if (delaytime <= emu.time()) and check_mem( positions ) then
default_checksum = check_scores( positions );
if read_scores( positions ) then
emu.print_verbose( "hiscore: scores read OK" );