This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
andrew28's profile picture

How do I get the tick time in minecraft?

Started by andrew28, 16 March 2014 - 11:07 PM
andrew28 #1
Posted 17 March 2014 - 12:07 AM
Hello ComputerCraft Community!,
I was recently wondering how to check the tick time in minecraft, a tick in minecraft is 1/20 of a real life second. Also I was wondering if It could say if it is day (1-20,000) or night. I didn't tell how many ticks are in night because I don't know that either, so thanks for an admin for approving this post and thanks for people who read and answer posts on this forum. :D/>
CometWolf #2
Posted 17 March 2014 - 06:10 AM
You can use os.time to know what minecraft time it is. Getting the current tps is a lot more tricky, since it decides how fast the computer runs aswell, thus affecting any means it has of gauging it.
apemanzilla #3
Posted 18 March 2014 - 12:52 PM
Only way I can think of is via HTTP. os.clock *may* be a constant rate but it is difficult to tell.
Lyqyd #4
Posted 18 March 2014 - 02:32 PM
All of the built-in time stuff takes tick rate as gospel, so there are always 20 ticks to the second as seen by the computers, regardless of how long those twenty ticks take in real time.
CometWolf #5
Posted 18 March 2014 - 03:15 PM
In other words, http would be the only option.
Bubba #6
Posted 18 March 2014 - 03:22 PM
In other words, http would be the only option.

Not really. You don't need the tick rate or anything else involving 'real world' time if all you need to do is determine the day/night cycle, which seems to be what the OP is looking for. In fact, I can't really fathom a reason to use real world time except to perform tasks at a particular time or as a clock. Most MC related tasks would be monitored using MC time units.
Edited on 18 March 2014 - 02:24 PM
CometWolf #7
Posted 18 March 2014 - 04:15 PM
I already pointed out how to check the in-game time, what we're discussing beyond that is purely checking the current tps.
I was recently wondering how to check the tick time in minecraft
Although what you are saying is very true, as few tasks could possibly require such a thing, it's still an interesting thing to be able to keep tabs on. The tps on a server has a direct correlation to server-side lag, and as such might be useful to know.