Use the perf_counter method to measure the elapsed time.
Add a high_precision_sleep method for a more efficient sleeping mechanism.
Tests
[x] Run tests.
Test:
Create a PDO thread with a refresh rate of 0.01 seconds.
Check the time elapsed between each loop iteration
Old implementation:
New implementation:
Documentation
Please update the documentation.
[x] Update docstrings of every function, method or class that change.
Code formatting
[x] Use black package to format the code: black -l 100 ingeniamotion tests. It is recommended to configure the code editor to automatically format the code using black with a max length line of 100.
Description
Optimize the PDO thread timing.
Fixes # INGM-425
Type of change
Tests
Test:
Old implementation:
New implementation:
Documentation
Please update the documentation.
Code formatting
black -l 100 ingeniamotion tests
. It is recommended to configure the code editor to automatically format the code using black with a max length line of 100.