Exemple #1
0
 public void StopAndClear()
 {
     internCache.Clear();
     if (cacheCleanupTimer != null)
     {
         cacheCleanupTimer.Dispose();
     }
 }
 /// <summary>
 /// Stop stats collection
 /// </summary>
 public void Stop()
 {
     logger.Info(ErrorCode.PerfCounterStopping, "Stopping  Windows perf counter stats collection");
     if (timer != null)
     {
         timer.Dispose(); // Stop timer
     }
     timer = null;
 }
        public void Dispose()
        {
            cpuCounterPF?.Dispose();
            availableMemoryCounterPF?.Dispose();

            timeInGCPF?.Dispose();
            if (genSizesPF != null)
            {
                foreach (var item in genSizesPF)
                {
                    item?.Dispose();
                }
            }
            allocatedBytesPerSecPF?.Dispose();
            promotedMemoryFromGen1PF?.Dispose();
            numberOfInducedGCsPF?.Dispose();
            largeObjectHeapSizePF?.Dispose();
            promotedFinalizationMemoryFromGen0PF?.Dispose();
            cpuUsageTimer?.Dispose();
        }
Exemple #4
0
 /// <summary>
 /// Stop stats collection
 /// </summary>
 public void Stop()
 {
     if (logger.IsEnabled(LogLevel.Debug))
     {
         logger.LogDebug((int)ErrorCode.PerfCounterStopping, "Stopping Windows perf counter stats collection");
     }
     if (timer != null)
     {
         timer.Dispose(); // Stop timer
     }
     timer = null;
 }
Exemple #5
0
        internal void Stop()
        {
            running = false;
            if (longTurnTimer != null)
            {
                longTurnTimer.Dispose();
                longTurnTimer = null;
            }

            WorkerPoolThread[] threads;
            lock (lockable)
            {
                threads = pool.ToArray <WorkerPoolThread>();
            }

            foreach (WorkerPoolThread thread in threads)
            {
                thread.Stop();
            }

            systemThread.Stop();
        }
Exemple #6
0
        public void Stop()
        {
            iStack.EventProductAdded -= ProductAdded;
            iStack.EventUpnpAdded    -= UpnpAdded;

            SafeTimer timer = null;

            lock (iLock)
            {
                iRunning = false;
                foreach (var device in iDeviceWatchers.Values)
                {
                    device.Dispose();
                }
                iDeviceWatchers.Clear();
                iOpenDevices.Clear();
                timer  = iTimer;
                iTimer = null;
            }
            if (timer != null)
            {
                timer.Dispose();
            }
        }
Exemple #7
0
 private void MetroLinkEnableCyclicExecution_Click(object sender, EventArgs e)
 {
     if (safeTimer != null && safeTimer.IsRunning)
     {
         LuaCancellationRequested = true;
         safeTimer?.Dispose();
         this.LogPrint("Timer disabled");
         NotifyUser("Timer is stopped", false, false);
         SetupTimerControls(false);
     }
     else
     {
         labelRequestTime.Visible = false;
         if (!info.IsInGame)
         {
             new TaskDialog("Error!", nameof(AxTools), "Player isn't logged in", TaskDialogButton.OK, TaskDialogIcon.Stop).Show(this);
             return;
         }
         if (!int.TryParse(metroTextBoxTimerInterval.Text, out luaConsoleSettings.TimerInterval) || luaConsoleSettings.TimerInterval < 50)
         {
             TaskDialog.Show("Incorrect input!", nameof(AxTools), "Interval must be a number more or equal 50", TaskDialogButton.OK, TaskDialogIcon.Warning);
             return;
         }
         if (textBoxLuaCode.Text.Trim().Length == 0)
         {
             new TaskDialog("Error!", nameof(AxTools), "Script is empty", TaskDialogButton.OK, TaskDialogIcon.Stop).Show(this);
             return;
         }
         SetupTimerControls(true);
         LuaCancellationRequested = false;
         safeTimer = this.CreateTimer(luaConsoleSettings.TimerInterval, info, TimerLuaElapsed);
         safeTimer.Start();
         NotifyUser("Timer is started", false, false);
         this.LogPrint("Timer enabled");
     }
 }
Exemple #8
0
 public void Dispose()
 {
     cacheCleanupTimer.Dispose();
 }
Exemple #9
0
 public void StopAndClear()
 {
     internCache.Clear();
     cacheCleanupTimer?.Dispose();
 }
Exemple #10
0
 public void OnStop()
 {
     pluginIsActive = false;
     timer.Dispose();
 }
Exemple #11
0
 public void Dispose()
 {
     gatewayRefreshTimer?.Dispose();
 }
Exemple #12
0
 private void DumperForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     chatTimer?.Dispose();
 }
 public void OnStop()
 {
     timer.Dispose();
 }