I have a function that i want it to be called every 20 seconds, i'm using a timer but it is not working, so i'm wondering is it because i'm calling it in a wrokng place !
below is my code, i want to know what i'm doing wrong ??!
static void Main()
{
System.Threading.Timer LaunchingTimer = new System.Threading.Timer(new TimerCallback(CreateThreads), null, 0, 20 * 1000);
}
static void CreateThreads()
{
Thread thread1 = new Thread(new ThreadStart(LaunchApp));
Thread thread2 = new Thread(new ThreadStart(LaunchApp));
thread1.Start();
thread2.Start();
}