diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-07 22:57:34 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | 12988e5282ef52a2806cbaca9f4074698f35e399 (patch) | |
| tree | 7a8d5a65a8e8478ba5855e84a1077baee1a2028d /src/SpeedCalc.cc | |
| parent | f25e67b0178511b26d55642f215a095321a169a8 (diff) | |
Replaced uint64_t with off_t or int64_t.
Since off_t is int64_t with LFS, we cannot take advantage of extra
capacity of uint64_t.
Diffstat (limited to 'src/SpeedCalc.cc')
| -rw-r--r-- | src/SpeedCalc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SpeedCalc.cc b/src/SpeedCalc.cc index c792df9e..719a1cc3 100644 --- a/src/SpeedCalc.cc +++ b/src/SpeedCalc.cc @@ -79,7 +79,7 @@ unsigned int SpeedCalc::calculateSpeed() { void SpeedCalc::update(size_t bytes) { accumulatedLength_ += bytes; std::transform(&lengthArray_[0], &lengthArray_[2], &lengthArray_[0], - std::bind1st(std::plus<uint64_t>(), (uint64_t)bytes)); + std::bind1st(std::plus<int64_t>(), (int64_t)bytes)); if(isIntervalOver()) { changeSw(); } @@ -103,7 +103,7 @@ void SpeedCalc::changeSw() { } unsigned int SpeedCalc::calculateAvgSpeed() const { - uint64_t milliElapsed = start_.differenceInMillis(global::wallclock()); + int64_t milliElapsed = start_.differenceInMillis(global::wallclock()); // if milliElapsed is too small, the average speed is rubish, better return 0 if(milliElapsed > 4) { |
