using System;
using System.Timers;
class TestTimer
{
public static void Main()
{
Timer timer = new Timer();
timer.Elap
sed += new ElapsedEventHandler( DisplayTimeEvent );
timer.Interval = 1000;
timer.Start();
timer.Enabled = true;
while ( Console.Read() != 'q' )
{
//-------------
}
}
public static void DisplayTimeEvent( object source, ElapsedEventArgs e )
{
Console.Write(r{0}, DateTime.Now);
}