How I can do that consol aplication do some function every one minute?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using Timer = System.Timers.Timer;
namespace timetotime
{
class Program
{
static void Main(string[] args)
{
Timer t = new Timer(3000); // 1 sec = 1000, 60 sec = 60000
t.AutoReset = true;
t.Elapsed += new System.Timers.ElapsedEventHandler(t_Elapsed);
t.Start();
Console.ReadLine();
}
private static void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Console.WriteLine("1");
Console.ReadLine();
// do stuff every minute
}
}
}