// 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.Threading; class MainClass { private static Random rng = new Random(); public static void Main(string[] args) { Timer t = new Timer(new TimerCallback(Test), null, 0, 10000); while(true) Thread.Sleep(1000); } static void Test(Object o) { Console.WriteLine("Start : " + DateTime.Now); Thread.Sleep(rng.Next(10) * 1000); Console.WriteLine("End : " + DateTime.Now); } }