static void Main() { TimeHandler timeHandler = new TimeHandler(); Counter l = new Counter(); l.Subscribe(timeHandler); timeHandler.Start(); }
private void HeardIt(TimeHandler m, Time e) { System.Console.WriteLine("HEARD IT AT {0}", e.Timer); }
public void Subscribe(TimeHandler m) { m.Tick += new TimeHandler.TickHandler(HeardIt); }