public void DisplayTimeEvent(object source, ElapsedEventArgs e) { Instance.Dispatcher.Invoke((MethodInvoker) delegate { try { lblStatRunsPerSecond.Content = bot.CallsPerSecond + " runs/s"; counterCallsPerSecond = 0; } catch { } }, DispatcherPriority.Background); }