hardbyte / python-can

The can package provides controller area network support for Python developers
https://python-can.readthedocs.io
GNU Lesser General Public License v3.0
1.31k stars 604 forks source link

Period must be >= 1ms for BCM using Win32 API #1847

Closed pierreluctg closed 2 months ago

pierreluctg commented 2 months ago

Using a win32 SetWaitableTimer with a period of 0 means that the timer will only be signaled once. This will make the ThreadBasedCyclicSendTask to only send one message.

https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-setwaitabletimer

The period of the timer, in milliseconds. If lPeriod is zero, the timer is signaled once. If lPeriod is greater than zero, the timer is periodic. A periodic timer automatically reactivates each time the period elapses, until the timer is canceled using the CancelWaitableTimer function or reset using SetWaitableTimer. If lPeriod is less than zero, the function fails.