From a5f681fe9e0195b32bf1c7901901df2477e2794c Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Mon, 28 Dec 2009 21:23:31 +0100 Subject: * Time, by definition, cannot be negative for a timer, so this should be uint32, not int32. :) --HG-- branch : trunk --- src/shared/Timer.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/shared/Timer.h') 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 -- cgit v1.2.3