Jump to content
RAINBOW

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

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.

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

I counted it, it's not 12.5, so right now I can only verify that it is not 12.5 seconds :P

 

 

...oO(what the hell is he building that can't be off by one 1 msec?)

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...