IanHarvey / bluepy

Python interface to Bluetooth LE on Linux
Other
1.6k stars 491 forks source link

Timeout too large exception in btle.py when system time jumps due to NTP correction #512

Open drdas opened 1 month ago

drdas commented 1 month ago

When running the ble scanning on a system where the network time sync for system time may take a while due to bad internet connectivity, the scanner thread throws an exception - "timeout too large".

This should be fixed by changing the use of time.time() to time.monotoic(0 for local timers such as: https://github.com/IanHarvey/bluepy/blob/master/bluepy/btle.py#L846C9-L846C28