As some of you may have noticed already, there is a keyword called clock
and this seems to have no use. I have researched it on ROBLOX wiki, but found out nothing. Is there any way of how to use it or is it even doing something? I thought it may be standing in relation to time
or os.time
. Maybe it's a Lua keyword that was deactivated when converting it to rblx.lua? I've got no clue and would really much appreciate any help.
First I'd like to state that clock
is not a keyword. Disappointingly whatever ROBLOX uses to color their code puts special variables and functions with the keywords list. Words like os, floor, and table are not Lua keywords, but words like while, end, and not are keywords.
I found what clock
refers to is os.clock
, which is disabled in ROBLOX but is in normal Lua. This page tells that os.clock
returns the number of seconds of CPU time for the program.