Jump to content

[10924][patch] Timer system improved


Recommended Posts

Posted

Any way i think better commiting Ambal solution in git for public test .

We can argue and correct patch after this ;)

We have 49 day time before overflow :D

Posted

Non uint32 non appropriate by client expected value size as point Ambal at irc to me.

But discussion _not_ secondary because selection this part set way how all code work.

It will can't easy replaced to another way work. Better discuss and search acceptable sollution that add and then resolved problems in not easy way.

Posted

What about solutions about time hops? Some of them might happen, but rare.

- User Time change while server running ( no seriously)

- Summe/Winter time change (two a year)

The funktion GetTickCount() returns the time ticks since system-boot-up, why not try to count your own timer in one variable to solve some issues?

Timer Thread(

uint64 globaltimevalue

init(

globaltimevalue==0

old_time=GetTickCount()

)

run(

new_time=GetTickCount()

if (old_time<=new_time) globatimevalue=globaltimevalue+(new_time-old_time)

if (old_time>new_time) // do noting because some time hopp has happend and we don't know the time between

old_time==GetTickCount()

)

uint64 getglobaltimevalue( return globaltimevalue)

)

The Thead should be called by the world class and returns the positive value of time ticks since world start.

The common funktion should be able to calculate new_globalvalue-old_globalvalue for time_diff

Maybe i'am totaly wrong, but this thought flashed through my mind

cheers

Posted
as a matter of fact: uptime over 7 days is not blizzlike

Playing in game GM-s also not bliz-like and MOST not bliz-like is free in both meanings open source project.

So i suggest use term in limited form, apply to normal player in game expirience. No to random other parts :)

Posted
as a matter of fact: uptime over 7 days is not blizzlike

Playing in game GM-s also not bliz-like and MOST not bliz-like is free in both meanings open source project.

So i suggest use term in limited form, apply to normal player in game expirience. No to random other parts :)

yea but what i really meant is that you are discussing some absurdly long uptimes that won't happen in near future

something close to optimizing startup procedures so they run half a second faster (but its only once per runtime)

Posted

lp-vamp, thanks for your comment. I already implemented and pushed into my repo similar approach as yours :) Using our own method of counting world time brings us more flexibility and stability in dealing with timer overflows + we are now able to generate 100% correct update diffs on overflow event.

Everyone is welcome to test latest version of this patch :) ...And don't be afraid providing a feedback if patch is actually working :)

Posted

Everyone, who is testing current patch, I would like you to check if following bugs from [10677] and [10688] are fixed:

1) mobs' corpses disappear correctly;

2) temporary enchants are bugged, e.g. Wound Poison should dispell in 60 mins but instead it dispells in 60 secs.

Cheers :)

Posted
49 days of uptime is unrealistic even for Blizz .......... Regular uptime of mangos servers is even lower...
as a matter of fact: uptime over 7 days is not blizzlike
yea but what i really meant is that you are discussing some absurdly long uptimes that won't happen in near future

Assuming there would be some crazy guy out there, who has a costly server rack, and has his MaNGOS running for 49+ days....

Well, lets first meet such guy who will have a server running for 49 days with online > 0 players :)

Well... I don't want to be the party-pooper but this thread is getting me scared a bit. :)

http://img513.imageshack.us/i/up1r.jpg/

http://img823.imageshack.us/i/up2l.jpg/

My small 'family & friends' server runs for about 2-3 weeks 24/7, then I always turn it off myself in order to backup databases.

Then, after succesfull backupping the databases, I restart that pc, relaunch mangos, and it will go into same 2-3 week cycle.

So, imho, when I don't shut it down myself it would run easily 49 days+.

Posted
So, imho, when I don't shut it down myself it would run easily 49 days+.

Since yesterday this is not an issue, herrtrigger. I'd added an overflow protection which worked fine during my tests.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use