Changeset 8771 for trunk/libtransmission/torrent.c
- Timestamp:
- Jul 2, 2009, 2:04:34 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/torrent.c
r8770 r8771 18 18 #include <assert.h> 19 19 #include <limits.h> /* INT_MAX */ 20 #include <math.h> /* fabs */ 20 21 #include <string.h> /* memcmp */ 21 22 #include <stdlib.h> /* qsort */ … … 955 956 if( ( tor->etaSpeedCalculatedAt + 800 ) < now ) { 956 957 tor->etaSpeedCalculatedAt = now; 957 tor->etaSpeed = fabs(tor->etaSpeed>0.001)958 tor->etaSpeed = (fabs(tor->etaSpeed)<0.0001) 958 959 ? s->pieceDownloadSpeed /* if no previous speed, no need to smooth */ 959 960 : 0.8*tor->etaSpeed + 0.2*s->pieceDownloadSpeed; /* smooth across 5 readings */
Note: See TracChangeset
for help on using the changeset viewer.