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.
✓ ANSWER ACCEPTED
What is "clock" for?
1 answer
✓ Accepted answer
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.
1 comment
0
Thank you very much, it bothered me a long time already.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
good question
Thanks. It really bothers me.