os.time

From ComputerCraft
Jump to: navigation, search

os.time
Function
Syntax
os.time()
Returns number
API os
Source CC:Tweaked (source)

Returns the current real or inagme time. Valid arguments for source are "utc", "local", and "ingame".

ExampleExampleGet the current Time
Print the current ingame time in a human readable format.
Code
print(textutils.formatTime(os.time()))
Output 7:00 AM