Skip to content

Process API

PatriikPlays edited this page Dec 24, 2021 · 6 revisions

This api can create processes from a string function or a file. It can also list all of the processes that are currently running and find a process by a thread. This is almost the core of the OS.

process.findByThread(thread thread)

Finds a process by a thread.

process.isProcess()

Returns true if the current thread is a process else returns nil.

process.new(string name, string code, unused perms, ...)

Creates a new process from the parameter code with the name of name.

process.load(string name, string absoluteFilePath,unused perms, ...)

Creates a new process from the file at absoluteFilePath with the name of name.

process.getIdleTime()

Returns the idle time.

process.getIdlePercentage()

Returns the idle precentage.

process.getAvgIdleTime()

Returns the average idle time.

process.getAvgIdlePercentage()

Returns the average idle percentage.

process.list()

Returns a list of all processes.