When a timer’s autostart is set to true, does it execute the elapsed event automatically, or just wait for the elapsed interval then executes the event?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume you mean the Timer.Start method in the
System.Timers.Timerclass, and the answer is no,Elapseddoesn’t get fired until the first interval actually elapses.Note: If by
Autostartyou actually meanAutoReset, then that property automatically stops the timer after the firstElapsedevent is fired. It has no direct effect on what theStartmethod does.