The OS API is a API added by Computer Craft (denoted as CC) that adds various useful functions for use within CC's Lua operating system. The following functions are listed below:

Function Returns Explenation
os.getTime() nil Gets the system time. (MC time)
os.shutdown() nil Shuts down the computer.
os.reboot() nil Reboots the computer. num Returns the number of days since day one. Ex: '7432'
os.setAlarm(num time) num - alarmID Triggers an 'alarm' event at a set time. Ex: os.setAlarm(12.00)
os.cancelAlarm(num alarmID) nil Cancels a set alarm.
os.sleep(num seconds) nil Alisas for sleep(). Makes the computer sleep for x seconds.
os.loadAPI(str API_Path) bool - succeeded Loads specified file as an API.
os.unloadAPI(str API_Path) nil Unloads specified file as an API.
os.setComputerLabel(str Labl) nil Sets the label of the computer.
os.getComputerLabel() str Returns the computer label as a string.
os.getComputerID() num Returns a unique ID for the computer.
os.clock() num Returns the up time of the computer. ----------------------- See here for info on this function. (CC Wiki)
os.queueEvent() ----------------------- See here for info on this function. (CC Wiki)
os.pullEvent(str EvtType) str event, param Waits for specified event (Event_Type) before breaking.
os.pullEventRaw(str EvtType) str event, param Same as os.pullEvent but can handle teminate events.
os.startTimer(num time) num - timerID Triggers an event at x seconds after it was executed.
os.cancelTimer(num timerID) nil Cancels a timer.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.