* Fix for GetOSTime
This commit is contained in:
Applevangelist 2022-08-22 17:05:02 +02:00
parent 882c2e2378
commit 02a59b0742

View File

@ -1725,11 +1725,17 @@ end
-- @return #number Os time in seconds. -- @return #number Os time in seconds.
function UTILS.GetOSTime() function UTILS.GetOSTime()
if os then if os then
return os.clock() local ts = 0
end local t = os.date("*t")
local s = t.sec
local m = t.min * 60
local h = t.hour * 3600
ts = s+m+h
return ts
else
return nil return nil
end end
end
--- Shuffle a table accoring to Fisher Yeates algorithm --- Shuffle a table accoring to Fisher Yeates algorithm
--@param #table t Table to be shuffled. --@param #table t Table to be shuffled.