API Reference

Other

Members not yet sorted into a library.

Available Functions

FunctionDescription
warnPrints the given values through the same output path as print. Compat shim installed only when the environment does not already provide warn.
tickReturns the current Unix epoch time in seconds with sub second precision.
timeSame as tick(): current Unix epoch time in seconds with sub second precision.
elapsedTimeReturns the number of seconds elapsed since the process started, measured on a monotonic clock.
waitYields the current thread for the given number of seconds (default ~0.03) and returns the actual elapsed time.
spawnSchedules the function to run as soon as possible on a new thread.
delaySchedules the function to run on a new thread after the given number of seconds.
printidentityPrints the current thread identity as 'Current identity is N'.
versionReturns the compat layer version string.
sharedA plain persistent table shared across all scripts executed in this state.
ypcallAlias of pcall.
collectgarbageSupports only the 'count' action, returning memory in use in kilobytes. Any other action raises a capability error.
WaitDeprecated capitalized alias of wait.
SpawnDeprecated capitalized alias of spawn.
DelayDeprecated capitalized alias of delay.
ElapsedTimeDeprecated capitalized alias of elapsedTime.
VersionDeprecated capitalized alias of version.