Training
Module
Get Started with Dates, Times, and Time Zones - Training
Learn how to handle date and time effectively in C# applications.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Windows Forms Timer component has an Interval property that specifies the number of milliseconds that pass between one timer event and the next. Unless the component is disabled, a timer continues to receive the Tick event at roughly equal intervals of time.
This component is designed for a Windows Forms environment. If you need a timer that is suitable for a server environment, see Introduction to Server-Based Timers.
The Interval property has a few limitations to consider when you are programming a Timer component:
If your application or another application is making heavy demands on the system — such as long loops, intensive calculations, or drive, network, or port access — your application may not get timer events as often as the Interval property specifies.
The interval is not guaranteed to elapse exactly on time. To ensure accuracy, the timer should check the system clock as needed, rather than try to keep track of accumulated time internally.
The precision of the Interval property is in milliseconds. Some computers provide a high-resolution counter that has a resolution higher than milliseconds. The availability of such a counter depends on the processor hardware of your computer.
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback:
Training
Module
Get Started with Dates, Times, and Time Zones - Training
Learn how to handle date and time effectively in C# applications.