// Wait until time has elapsed, then check to see // if anyone is listening, and send the message public void Run() { // sleep until time has elapsed Thread.Sleep(seconds * 1000); if (TimeExpired != null) { // Create the CountDownClockEventArgs to hold the message CountDownClockEventArgs e = new CountDownClockEventArgs(this.message); // fire the event TimeExpired(this, e); } }
// Wait until time has elapsed, then check to see // if anyone is listening, and send the message public void Run() { // sleep until time has elapsed Thread.Sleep(seconds * 1000); if (TimeExpired != null) { // Create the CountDownClockEventArgs to hold the message CountDownClockEventArgs e = new CountDownClockEventArgs(this.message); // fire the event TimeExpired(this, e); } }