Changeset 2862 for box/trunk/lib
- Timestamp:
- 26/02/2011 14:09:45 (15 months ago)
- File:
-
- 1 edited
-
box/trunk/lib/common/RateLimitingStream.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/RateLimitingStream.cpp
r2847 r2862 64 64 // How are we doing so far? (for logging only) 65 65 box_time_t currentDuration = currentTime - mStartTime; 66 67 // in case our timer is not very accurate, don't divide by zero on first pass 68 if(currentDuration == 0) 69 { 70 BOX_TRACE("Current rate not yet known, sending immediately"); 71 return bytesReadThisTime; 72 } 73 66 74 uint64_t effectiveRateSoFar = (mTotalBytesRead * MICRO_SEC_IN_SEC_LL) 67 75 / currentDuration;
Note: See TracChangeset
for help on using the changeset viewer.
