// spawn threads private void PortStatisticsManagerThread() { while (Thread.CurrentThread.ThreadState == ThreadState.Running) { Thread.Sleep(updateNetworkInfoEveryMiliseconds); portStatisticsManager.Tick(); } }
void PortStatisticsManagerThread() { portStatisticsManager = new PortStatisticsManager(secondsToKeepNetworkSamples, secondsToClosePIDPortsWithNoRequests, secondsToUpdatePidToPortsTable); while (Thread.CurrentThread.ThreadState == ThreadState.Running) { Thread.Sleep(updateNetworkInfoEveryMiliseconds); portStatisticsManager.Tick(); } }