I have tried looking at the wiki but it doesn't explain it well enough for me to understand.
If you did:
print(tick())
It would return a large number value that is the number of seconds that have passed since January 1st, 1970. It is just a way to tell the time of the local session's computer. It is precise to the nearest millisecond (0.001s).
The number would probably look something like this: 1551206971.4111
tick()
returns the number of seconds as a number since the UNIX Epoch, which is January 1, 1970.
Extra
Sometimes you might not want the decimal places, so I provided a function to return the rounded version of tick()
:
function tickRounded() local seconds = tick() return math.floor(seconds) end
Running tickRounded()
would return the number of seconds since January 1, 1970 as an integer instead of a decimal.
Hope this helps!