Exemple #1
0
 private static void OnWaitPeriodOver(Object sender, ElapsedEventArgs e)
 {
     timer.Stop();
     if (!alreadySent)
     {
         target?.SendAPICall(toSend);
         alreadySent = true;
         timer.Start();
     }
 }
Exemple #2
0
 public static void SendAPICall(WLEDDevice t, string call)
 {
     if (timer.Enabled)
     {
         //Save to send once waiting period over
         target      = t;
         toSend      = call;
         alreadySent = false;
         return;
     }
     timer.Start();
     t?.SendAPICall(call);
     alreadySent = true;
 }