using System;
using System.Collections.Generic;
using System.Text;
using System.Timers;
namespace TimerApplication
{
class Program
{
static void Main(string[] args)
{
Timer timer = new Timer(5*1000);
timer.Elapsed += new ElapsedEventHandler(outMessage);
timer.AutoReset = true;
timer.Enabled = true;
string strLine;
do
{
strLine = Console.ReadLine();
} while (strLine != null && strLine != "exit");
}
public void outMessage(object source,ElapsedEventArgs e)
{
Console.WriteLine("Hello");
}
}
}