Skip to content

LibTSMCore

Functions

LoadAll

lua
function LibTSMCore.LoadAll()

Loads all modules.

ModuleInfoIterator

lua
function LibTSMCore.ModuleInfoIterator()
  -> fun():number, string, string, number, number, nil, number

Returns an iterator over all available modules.

Returns:

TypeDescription
fun():number, string, string, number, numberIterator with fields: index, componentName, modulePath, loadTime, unloadTime
nil
number

NewComponent

lua
function LibTSMCore.NewComponent(name)
  -> <T:LibTSMComponent>

Creates a new component.

Parameters:

NameTypeDescription
name<T>The name of the component

Returns:

TypeDescription
<T:LibTSMComponent>

SetTimeFunction

lua
function LibTSMCore.SetTimeFunction(timeFunc)

Sets the time function.

Parameters:

NameTypeDescription
timeFuncfun(): numberA function which returns the time with high precision

UnloadAll

lua
function LibTSMCore.UnloadAll(maxTime)
  -> boolean

Unloads all modules.

Parameters:

NameTypeDescription
maxTimenumberThe max time before aborting early

Returns:

TypeDescription
boolean