I think I saw a thread on this recently but just a bit of advice needed (or rather just to confirm I'm going about this the best way).
I have a counter that records total experience and coins gained during a group which I report avery so often to the group. Groups on average last for several hours. I have an alias that then resets it back to zero at the end of the group.
What I'm wanting to do is also add a time on that so that when I join a group and I reset my exp & coin counters to zero, it will also start a timer at the same time. When I report to the group the total exp & coin at any given time, it will also give the time taken so far, and calculate experience per hour based on that.
The calculation part is not a problem, I'm just trying to figure the best way to get the total time on it. It does not need to be extremely accurate, but I figured that I could have a timer that fires say every minute which grabs a variable (called total_time for example) and adds 1 to it. This variable would of course reset to zero whenever I reset the exp & coin totals.
The calculation part would then just grab that total_time variable and divide it by 60, then divide the total exp/coins by that result to give an average per hour.
All good, but is that timer firing every minute the best way to do it? I want as little disruption as possible to game play (lags etc when it fires) or would the timer firing have a negligible effect?
Thanks in advance for any advice (even if it's just to say I have the best way to do it).
I have a counter that records total experience and coins gained during a group which I report avery so often to the group. Groups on average last for several hours. I have an alias that then resets it back to zero at the end of the group.
What I'm wanting to do is also add a time on that so that when I join a group and I reset my exp & coin counters to zero, it will also start a timer at the same time. When I report to the group the total exp & coin at any given time, it will also give the time taken so far, and calculate experience per hour based on that.
The calculation part is not a problem, I'm just trying to figure the best way to get the total time on it. It does not need to be extremely accurate, but I figured that I could have a timer that fires say every minute which grabs a variable (called total_time for example) and adds 1 to it. This variable would of course reset to zero whenever I reset the exp & coin totals.
The calculation part would then just grab that total_time variable and divide it by 60, then divide the total exp/coins by that result to give an average per hour.
All good, but is that timer firing every minute the best way to do it? I want as little disruption as possible to game play (lags etc when it fires) or would the timer firing have a negligible effect?
Thanks in advance for any advice (even if it's just to say I have the best way to do it).