private void ThrottledUpdate()
 {
     _updateThrottler.Run(
         async() =>
     {
         var sw = new Stopwatch();
         sw.Start();
         this.UpdateCharts();
         sw.Stop();
         await Task.Delay(sw.Elapsed);
     });
 }
Beispiel #2
0
 private void ThrottledUpdate(Action updateAction)
 {
     _updateThrottler.Run(
         async() =>
     {
         var sw = new Stopwatch();
         sw.Start();
         updateAction();
         sw.Stop();
         await Task.Delay(sw.Elapsed);
     });
 }
 private void AddlineChat(object sender, object e)
 {
     total += 1;
     _updateThrottler.Run(
         async() =>
     {
         var sw = new Stopwatch();
         sw.Start();
         this.UpdateCharts(total);
         sw.Stop();
         await Task.Delay(sw.Elapsed);
     });
 }