DeOps.DeOpsContext.SecondTimer_Tick C# (CSharp) Method

SecondTimer_Tick() public method

public SecondTimer_Tick ( object state ) : void
state object
return void
        public void SecondTimer_Tick(object state)
        {
            // flag set, actual timer code run in thread per core

            if (Lookup != null)
                Lookup.SecondTimer();

            Cores.SafeForEach(c => c.SecondTimer());

            // bandwidth
            Bandwidth.NextSecond();

            // fastest degrades over time, min is 10kb/s
            FastestUploadSpeed--;
            FastestUploadSpeed = Math.Max(Bandwidth.Average(Bandwidth.Out, 10), FastestUploadSpeed);
            FastestUploadSpeed = Math.Max(10, FastestUploadSpeed);

            AssignUploadSlots();
        }