Jump to content

A nice easy question. EveryTenMinutes. How long is Ten mins in PZ!


RAINBOW

Recommended Posts

Haha, RoboMat, You troll you!  It's about ten seconds yeah?  I'm writing a quick "Server Up Time" chat command, and using TenMinutes rather than ticks.  CPU cycles is overkill in this instance.  I need a modicum of accuracy however, because the difference of a second is fairly big once you take into the fact the 'scale' of it.  

 

i.e) If a server is up for 40 hours, then that little innacuracy (the difference of a second) becomes amplified.

Link to comment
Share on other sites

You're certain every 24 hours (1 day) game time is equal to 30 minutes in real time?  I couldn't find anywhere on the forums that clarified that.

 

I can't be off, not even by 1 millisecond.  If you're certain you read that somewhere I'll believe you, and thanks Aricane :)

Link to comment
Share on other sites

I've looked a bit. I don't think you can count on the gametime to be reliable. I think it has been coupled to FPS, at least in the past. What the server does now I'm not really sure.

 

Yup that's why I think a perfect "sync" can't be achieved.

Link to comment
Share on other sites

Someone didn't study "Limits" in maths! :)

 

The problem is not that my function is firing "EveryTenMinutes", but rather it is/will be doing so over an extended period of time.  The idea behind a player being able to call my(custom) function and access the stored variable means I don't want it to be off by hours(real time) which if I am a second 'off' will be amplified by two, by two by two etc...

 

Don't you see the merit in a player being able to simply type a command to see how long the server has been up?  It shows how long it has been since the last reset for example!  

 

As I said before tho, using Ticks is overkill for this too, I don't need it THAT accurate, but a modicum of accuracy is called for.  I doubt our server will stay up for longer than a week ever at a time, without a soft reset.  Ours is a persistent world however.  So, needs must.

Link to comment
Share on other sites

If you just want to know how long the server has been running in real time, you might want to see if the GameTime class has anything of use. It caught my eye in particular that there's a GetCalender() (sic) method that returns a Java class lib GregorianCalendar instance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...