Improve Torrent.BytesCompleted comment

This commit is contained in:
Matt Joiner 2018-01-27 12:01:09 +11:00
parent 704a0dd1fe
commit 8c6d0440c2
1 changed files with 4 additions and 1 deletions

5
t.go
View File

@ -80,7 +80,10 @@ func (t *Torrent) Drop() {
t.cl.mu.Unlock()
}
// Number of bytes of the entire torrent we have completed.
// Number of bytes of the entire torrent we have completed. This is the sum of
// completed pieces, and dirtied chunks of incomplete pieces. Do not use this
// for download rate, as it can go down when pieces are lost or fail checks.
// Sample Torrent.Stats.DataBytesRead for actual file data download rate.
func (t *Torrent) BytesCompleted() int64 {
t.cl.mu.RLock()
defer t.cl.mu.RUnlock()