RAINBOW Posted May 5, 2014 Share Posted May 5, 2014 Nice easy one. Wasn't able to find anything about it in the lua files. "How long is Ten minutes (Clock) in real time?" Link to comment Share on other sites More sharing options...
RoboMat Posted May 5, 2014 Share Posted May 5, 2014 A few ticks Link to comment Share on other sites More sharing options...
RAINBOW Posted May 5, 2014 Author Share Posted May 5, 2014 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 More sharing options...
RAINBOW Posted May 5, 2014 Author Share Posted May 5, 2014 I'll continue trawling the lua. Link to comment Share on other sites More sharing options...
Aricane Posted May 5, 2014 Share Posted May 5, 2014 1 day lasts 30 real time min IIRC. So 10 ingame minutes should be 12.5 seconds Link to comment Share on other sites More sharing options...
RAINBOW Posted May 9, 2014 Author Share Posted May 9, 2014 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 More sharing options...
Aricane Posted May 9, 2014 Share Posted May 9, 2014 I counted it, it's not 12.5, so right now I can only verify that it is not 12.5 seconds ...oO(what the hell is he building that can't be off by one 1 msec?) Link to comment Share on other sites More sharing options...
Aricane Posted May 9, 2014 Share Posted May 9, 2014 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. RoboMat 1 Link to comment Share on other sites More sharing options...
RoboMat Posted May 9, 2014 Share Posted May 9, 2014 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 More sharing options...
RAINBOW Posted May 9, 2014 Author Share Posted May 9, 2014 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 More sharing options...
RAINBOW Posted May 9, 2014 Author Share Posted May 9, 2014 Anyway, lol! THANKS! 12.5 , thanks! Lol! Realised I seemed a bit ungrateful there, haha soz! Link to comment Share on other sites More sharing options...
Aricane Posted May 9, 2014 Share Posted May 9, 2014 It's not 12.5 secs, sorry. Try measuring the time with your phone Link to comment Share on other sites More sharing options...
harakka Posted May 9, 2014 Share Posted May 9, 2014 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 More sharing options...
RoboMat Posted May 9, 2014 Share Posted May 9, 2014 I use the GetCalendar() for the benchmarking in my modding utilities. You can take a look at that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now