mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
parent
63b0dae794
commit
73994914eb
@ -1724,11 +1724,17 @@ end
|
|||||||
--- Get OS time. Needs os to be desanitized!
|
--- Get OS time. Needs os to be desanitized!
|
||||||
-- @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
|
||||||
return nil
|
local m = t.min * 60
|
||||||
|
local h = t.hour * 3600
|
||||||
|
ts = s+m+h
|
||||||
|
return ts
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Shuffle a table accoring to Fisher Yeates algorithm
|
--- Shuffle a table accoring to Fisher Yeates algorithm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user