Difference between revisions of "OS (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(made starting page.)
 
(fixed formatting)
Line 1: Line 1:
 
The Operating System API allows for interfacing with the Lua based Operating System itself.
 
The Operating System API allows for interfacing with the Lua based Operating System itself.
 
The functions of this API are:
 
The functions of this API are:
os.version() which returns the version
+
*os.version() which returns the version
os.computerID() which returns the computerID
+
*os.computerID() which returns the computerID
os.run( environment, programpath, arguments)
+
*os.run( environment, programpath, arguments)
os.loadAPI( name ) which loads an API
+
*os.loadAPI( name ) which loads an API
os.unloadAPI( name ) which does the opposite
+
*os.unloadAPI( name ) which does the opposite
os.pullEvent()
+
*os.pullEvent()
os.queueEvent()
+
*os.queueEvent()
os.clock() returns the time.
+
*os.clock() returns the time.
os.startTimer( timeout )
+
*os.startTimer( timeout )
os.sleep( timeout ) makes the system wait a bit before doing something. Helpful with fake loading.
+
*os.sleep( timeout ) makes the system wait a bit before doing something. Helpful with fake loading.
os.time() returns the time. Varies from clock via precision.
+
*os.time() returns the time. Varies from clock via precision.
os.setAlarm( time )
+
*os.setAlarm( time )
os.shutdown() which is exactly what is said on the tin.
+
*os.shutdown() which is exactly what is said on the tin.
os.reboot() which does what it says.
+
*os.reboot() which does what it says.

Revision as of 19:49, 28 January 2012

The Operating System API allows for interfacing with the Lua based Operating System itself. The functions of this API are:

  • os.version() which returns the version
  • os.computerID() which returns the computerID
  • os.run( environment, programpath, arguments)
  • os.loadAPI( name ) which loads an API
  • os.unloadAPI( name ) which does the opposite
  • os.pullEvent()
  • os.queueEvent()
  • os.clock() returns the time.
  • os.startTimer( timeout )
  • os.sleep( timeout ) makes the system wait a bit before doing something. Helpful with fake loading.
  • os.time() returns the time. Varies from clock via precision.
  • os.setAlarm( time )
  • os.shutdown() which is exactly what is said on the tin.
  • os.reboot() which does what it says.