Difference between revisions of "Os.time"
From ComputerCraft Wiki
m (Moved to CAT:LuaCoreFunctions) |
|||
| Line 18: | Line 18: | ||
* You must use textutils.formatTime() if you want to print the time in readable form. | * You must use textutils.formatTime() if you want to print the time in readable form. | ||
}} | }} | ||
| + | |||
| + | [[Category:Lua_Core_Functions]] | ||
Revision as of 18:50, 28 November 2012
| Returns the current in-game time. | |
| Syntax | os.time() |
| Returns | The current in-game time. |
| Part of | ComputerCraft |
| API | os |
Examples
| Prints current time in 12 hour format (with AM and PM). | |
| Code |
local time = os.time() |
| Prints current time in 24 hour format. | |
| Code |
local time = os.time() |
Additional Notes
- You must use textutils.formatTime() if you want to print the time in readable form.