Hell all,
I'm having the following problem:
When I am trying to get the downloadspeed for every peer in a torrent with the MonoTorrent libary, It just retus zeroes. I get the downloadspeed for every peer like this:
foreach (PeerId p in manager.GetPeers())
{
nTorrentPeerStatus pStatus = new nTorrentPeerStatus();
pStatus.Url = p.Peer.ConnectionUri.ToString();
pStatus.DownloadSpeed = Math.Round(p.Monitor.DownloadSpeed/1024.0, 2);
pStatus.UploadSpeed = Math.Round(p.Monitor.UploadSpeed/1024.0, 2);
pStatus.RequestingPieces = p.AmRequestingPiecesCount;
s.PeerStatuses.Add(pStatus);
}
This always returns zeroes for both the down and upload speed. But when i place a breakpoint on one of these lines, they return something else than zero? So does anyone have any idea why it does work when I place a breakpoint and wait a few seconds before continuing instead of just getting all the download and upload speeds at once?