public static void WriteToConsole(object sender, TimeElapsedEventArgs e)
 {
     Console.WriteLine("----------------------------------------");
     Console.WriteLine("Second subscriber handler (ShowMessage):");
     Console.WriteLine("\t Input message: " + e.Message);
     Console.WriteLine("\t Elapsed time: " + e.ElapsedTime);
     Console.WriteLine("\t Sender: " + sender.GetType().Name);
     Console.WriteLine("----------------------------------------");
 }
 public void Start()
 {
     Thread.Sleep(time);
     TimeElapsedEventArgs e = new TimeElapsedEventArgs(message, time);
     OnTimeElapsed(e);
 }    
 protected virtual void OnTimeElapsed(TimeElapsedEventArgs e)
 {
     if (TimeElapsedEvent != null)
         TimeElapsedEvent(this, e);
 }