diff options
author | UbitUmarov | 2014-09-02 16:11:46 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-02 16:11:46 +0100 |
commit | 6611e75a2beba8d28aed4e1ea56135da491328c0 (patch) | |
tree | 48a824396bf83d5f23e687c672cb17b932aa2470 /OpenSim/Region | |
parent | *needs testing, not that good* change throttles math using floats and not (diff) | |
download | opensim-SC_OLD-6611e75a2beba8d28aed4e1ea56135da491328c0.zip opensim-SC_OLD-6611e75a2beba8d28aed4e1ea56135da491328c0.tar.gz opensim-SC_OLD-6611e75a2beba8d28aed4e1ea56135da491328c0.tar.bz2 opensim-SC_OLD-6611e75a2beba8d28aed4e1ea56135da491328c0.tar.xz |
void time change between gettime calls
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs index 384439c..1877cf0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | |||
@@ -304,11 +304,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
304 | return; | 304 | return; |
305 | } | 305 | } |
306 | 306 | ||
307 | Int32 deltaMS = Util.EnvironmentTickCountSubtract(m_lastDrip); | 307 | Int32 now = Util.EnvironmentTickCount(); |
308 | m_lastDrip = Util.EnvironmentTickCount(); | 308 | Int32 deltaMS = now - m_lastDrip; |
309 | m_lastDrip = now; | ||
309 | 310 | ||
310 | // This can be 0 in the very unusual case that the timer wrapped | ||
311 | // It can be 0 if we try add tokens at a sub-tick rate | ||
312 | if (deltaMS <= 0) | 311 | if (deltaMS <= 0) |
313 | return; | 312 | return; |
314 | 313 | ||