-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Type of issue
Missing information
Description
The page explains how I can disable the timer by setting dueTime to -1. I guess that's my interpretation. But there's also the period parameter that runs the timer at the specified interval. In no word is mentioned that the period will be ignored if no dueTime was set.
I only need an interval timer, not a delayed-once timer. So I set dueTime to Infinite/-1 and period to the desired interval. From my debugging output, I assume that my timer has ended up disabled. Not good.
I suggest adding an explicit warning (to all cunstructor overloads) that period is ignored when dueTime is Infinite/-1. That's really not intuitive. A suggested workaround would also be welcome. Set the period also for dueTime?
Page URL
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading/Timer.xml
Document Version Independent Id
832e8e3c-e498-bbea-44dc-81c60d696705
Platform Id
c1d51610-7405-6c58-a3a3-dc864e3e0caf