aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2009-12-28 21:23:31 +0100
committerXTZGZoReX <none@none>2009-12-28 21:23:31 +0100
commita5f681fe9e0195b32bf1c7901901df2477e2794c (patch)
tree3b43832ca81efe5b42b4c404dc79d4e5487ee74d
parent98d726fc4ea656c1a6b8ded5c337234a63c1a71d (diff)
* Time, by definition, cannot be negative for a timer, so this should be uint32, not int32. :)
--HG-- branch : trunk
-rw-r--r--src/shared/Timer.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/shared/Timer.h b/src/shared/Timer.h
index 46bba5475bc..005bd2112c1 100644
--- a/src/shared/Timer.h
+++ b/src/shared/Timer.h
@@ -87,17 +87,17 @@ struct TimeTracker
struct TimeTrackerSmall
{
- TimeTrackerSmall(int32 expiry) : i_expiryTime(expiry) {}
+ TimeTrackerSmall(uint32 expiry) : i_expiryTime(expiry) {}
void Update(int32 diff) { i_expiryTime -= diff; }
bool Passed(void) const { return (i_expiryTime <= 0); }
- void Reset(int32 interval) { i_expiryTime = interval; }
- int32 GetExpiry(void) const { return i_expiryTime; }
- int32 i_expiryTime;
+ void Reset(uint32 interval) { i_expiryTime = interval; }
+ uint32 GetExpiry(void) const { return i_expiryTime; }
+ uint32 i_expiryTime;
};
struct PeriodicTimer
{
- PeriodicTimer(int32 period, int32 start_time) :
+ PeriodicTimer(uint32 period, uint32 start_time) :
i_expireTime(start_time), i_period(period) {}
bool Update(const uint32 &diff)
@@ -109,13 +109,13 @@ struct PeriodicTimer
return true;
}
- void SetPeriodic(int32 period, int32 start_time)
+ void SetPeriodic(uint32 period, uint32 start_time)
{
i_expireTime=start_time, i_period=period;
}
- int32 i_period;
- int32 i_expireTime;
+ uint32 i_period;
+ uint32 i_expireTime;
};
#endif