Beispiel #1
0
 public void Run()
 {
     for (; ;)
     {
         DateTime dt = System.DateTime.Now;
         if (dt.Second == dt1.Second)
         {
             FiveSecondEventArgs timeinformation = new FiveSecondEventArgs();
             timeinformation.date = dt;
             if (onFiveSecond != null)
             {
                 onFiveSecond(this, timeinformation);
                 dt1 = dt.AddSeconds(5);
             }
         }
         //this.second = dt.Second;
     }
 }
Beispiel #2
0
 public void c_onSecondChange(object clock, FiveSecondEventArgs timeInformation)
 {
     Console.WriteLine(timeInformation.date.ToLocalTime());
 }