Cached server time

Added by King_bob about 9 years ago

I'm somewhat confused about this, I'm using a webbrowser control to load the server time every minute in .NET and It seems I have to manually clear the cache before I get a new time (if i don't, it'll stay at the same time permanantly the whole day). the cache clearing commands are extremely complicated and take up far too much time to run, so it isnt a realistic possibility. anyone know a better way to do this?


Replies (5)

RE: Cached server time - Added by nimetu about 9 years ago

every minute is overkill.

take a snapshot from server time every half hour or so and advance it manually. each RL second adds 10 to tick i think (it's morning, so might be wrong)

... but for you problem,
this maybe ? http://msdn.microsoft.com/en-us/library/system.net.cache.aspx
or you could just append random url parameter for each request

RE: Cached server time - Added by King_bob about 9 years ago

thanks, It never came to me that I could advance it manualy :D but then of course Id have to calculate everything, and Im not sure how exact that would be, as Im messageing the user at certain times it should be fairly exact :( anyone know how long it takes for a game houer to go by?

RE: Cached server time - Added by Houlecorn about 9 years ago

It is said to be 72 minutes for an in game day to go by which is already an approximation... good enough if you get new tick every half hour (irl). That approximation is base on this one : 1 ig second = 0,05 irl second, so 20 ig seconds = 1 ig second.
This is fairly close to reality since I we found with some calculations an average of 19.55 ig seconds for 1 irl. So with 3600 seconds an hour, you have about 184.1(...) real seconds an hour. Roughly 3 minutes. (3*24 = 72, and nimetu's link says 72 minutes for a day indeed)

If you're interested in all this and read french, I can only invite you to have a look at this code I wrote some time ago for an atysian time PHP library : http://lucjaulmes.free.fr/dates.php and all the discussions on that topic (french official forums) : http://forums.ryzom.com/showthread.php?t=33763
If you don't get french, try something like google translate. If you still can't make sense of any of it... I could sum up & translate part of it.

(1-5/5)