// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Timers; namespace E { public class Program { public static void Main(string[] args) { Timer t = new Timer(1000.0); t.Elapsed += delegate(object sender, ElapsedEventArgs e) { DateTime dt = DateTime.Now; System.Threading.Thread.Sleep(2000); Console.WriteLine(dt + " - " + DateTime.Now); }; t.Start(); System.Threading.Thread.Sleep(10000); t.Stop(); } } }