I am setting a timer interval of (Hours):
Timer1.Interval = ((CInt(ComboBox24.SelectedItem.ToString()) * 60 * 60) * 1000)
And then calculating the next DateTime that the ticks event will fire using:
MessageBox.Show("Next Timer Will Occur At: " & New Date(DateTime.Now.Ticks + Timer1.Interval))
Each time I call the MessageBox it shows me that the next event will fire now (Exact date, hour, minute, second).
I can’t see where I have gone wrong here as when I simply messagebox’d the calculation it clearly showed separate numbers (ticks) & by a large amount.
Ticksaren’t the same as milliseconds. UseDate.Now.TotalMilliseconds. Or, even better,AddMilliseconds: