[Space Lua] Extend os (#1836)

This commit is contained in:
Matouš Jan Fialka
2026-02-13 20:05:08 +01:00
committed by GitHub
parent e0182b3bb4
commit 3ddfab51e8
2 changed files with 17 additions and 0 deletions
+12
View File
@@ -168,3 +168,15 @@ assert(type(err) == "string")
-- Repeated specifiers
assertEquals(os.date("!%Y%Y", ts), "20062006")
-- os.clock
-- Returns a number (seconds)
assert(type(os.clock()) == "number")
-- Must be non-negative
assert(os.clock() >= 0)
-- Monotonically non-decreasing
local c1 = os.clock()
local c2 = os.clock()
assert(c2 >= c1)