I have problem with setting timer interval propably because of the type conversion. Please see my code below.
--------------------------------------
--------------------------------------
Firs time start is ok, but it is lunching DayTicker() 6 to 10 times in 1 minute, despite interval is set to = 1000000
Please help
--------------------------------------
Code:
TimeSpan HourNow = CurrTime.TimeOfDay;
TimeSpan HourScheduled = new TimeSpan (1,readint,RandomStartMin, 0);
TimeSpan Duration = HourScheduled - HourNow;
timer1.Interval = Convert.ToInt32(Duration.TotalMilliseconds);
timer1.Tick += new EventHandler(DayTicker);
timer1.Start();
Firs time start is ok, but it is lunching DayTicker() 6 to 10 times in 1 minute, despite interval is set to = 1000000
Please help