Lib system objects:

including few system functions:


Returns a timestamp, in seconds with fractions (float).
The value itself might differ depending on platforms, only differences between two values make sense.


Returns a timestamp, in milliseconds (int).


Print Lib system trace message in console. 2000 characters limit or truncated. For Lib objects or converted lua objects will use toString() method if available. Returns not truncated trace message.

message - trace message text or object with toString()


Throw Lib error. Current Lib binding implementation can't capture library errors using pcall function. Use callMethodSafe from Lib.Reflect for this.

REMOVED FROM LIB (use error())

error - error message string


Suspend the current execution for the given time (in seconds)

seconds - time (in seconds)

read-only properties:


prints current Lua Studio version


print("Lua Studio version: "..Lib.Sys.version)

local table = {a=5, v=8}

print(table) -- print something like: table: 067B9AA0

Lib.Sys.trace(table) -- print: { a => 5, v => 8 }

sys1 = Lib.Sys

sys2 = Lib.Sys

print(sys1 == sys2) -- result true

print(Lib.Sys.sleep == Lib.Sys.sleep) -- result false (Lib methods uncomparable)

print(Lib.Sys.getTime()) -- get current time in milliseconds since January 1, 1970 (midnight)

Lib.Sys.sleep(10) -- sleep for 10 seconds

Lib.Sys.throw("My Error")

Lib.Reflect.callMethodSafe(Lib.Sys, "throw", {"My Error"}, function(err) print("ERROR: "..err) end)

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator