Like stated above it's hard to figure out what you need...
A very simple timer demo would look something like this:
class Program
{
static void Main(string[] args)
{
Demo demo = new Demo();
demo.Run();
}
}
class Demo
{
private Timer _timer;
private int _iteration;
private bool _gameOver;
public void Run()
{
_gameOver = false;
_iteration = 1;
_timer = new Timer();
_timer.Interval = 10000;
_timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
_timer.Start();
while (!_gameOver)
{
Console.WriteLine("Game Loop No." + _iteration.ToString());
System.Threading.Thread.Sleep(500);
_iteration++;
}
Console.WriteLine("Game over (timeout hit)");
Console.ReadKey();
}
void _timer_Elapsed(object sender, ElapsedEventArgs e)
{
_gameOver = true;
}
}