I don't understand why this code fails to measure when 4 hours has elapsed.
if (guildVaultRunStarter.IsRunning)
{
if (guildVaultRunTimer.ElapsedMilliseconds > 4 * 60 * 60 * 1000) // 4 hours
{
guildVaultRunStarter.Reset();
log("Its been over 4 hours - empty bags.");
return true;
}
else
{
log("guildVaultRunTimer.ElapsedMilliseconds = " +
guildVaultRunTimer.ElapsedMilliseconds.ToString() + ".");
}
}
else
{
log("Start the 4 hour guild vault countdown.");
guildVaultRunStarter.Reset();
guildVaultRunStarter.Start();
}
The logging shows this:
[8/23/2009 12:17:21 PM]:Start the 4 hour guild vault countdown.
...
[8/23/2009 12:26:53 PM]:guildVaultRunTimer.ElapsedMilliseconds = 0.
...
[8/23/2009 12:27:26 PM]:guildVaultRunTimer.ElapsedMilliseconds = 0.
Why is it always 0?