mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-05 07:49:22 +00:00
Move many mods to Deprecated folder, fix spelling
This commit is contained in:
parent
5e822cec8d
commit
0042590aa6
539 changed files with 7475 additions and 3120 deletions
|
@ -0,0 +1,24 @@
|
|||
namespace NAK.BetterContentLoading;
|
||||
|
||||
public partial class DownloadManager2
|
||||
{
|
||||
private void StartBandwidthMonitor()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
Interlocked.Exchange(ref _bytesReadLastSecond, 0);
|
||||
Interlocked.Exchange(ref _completedDownloads, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private int ComputeUsableBandwidthPerDownload()
|
||||
{
|
||||
var activeCount = _activeDownloads.Count;
|
||||
if (activeCount == 0) return MaxDownloadBandwidth;
|
||||
return MaxDownloadBandwidth / activeCount;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue