How would I use time and tick?

How would I use time() and tick()?

time() -- What does it do?
tick() -- Also this

Appearently time “measures” time.

time is the number of seconds since the game started running. tick is the number of seconds since the UNIX epoch.


This is the Part I’m a bit confused about

It’s the number of seconds since 00:00 January 1, 1970 in UTC.

1 Like

wouldn’t you just use os.time() for this? It does the same thing as tick after testing

os.time is based off of UTC time, and tick is based off the timezone of the machine running it. So if you wanted to make a clock to display to the client, you would use tick.

Ok, now I’m getting a Little confused

I guess that will work, but how will I use time in games?

Precision of time() is whole seconds and only useful when you want to see server age… although you should be careful of what you choose based on a specific benchmarking:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.