We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 818b2b5 + 8f5700c commit 241850eCopy full SHA for 241850e
robotpy_ext/misc/precise_delay.py
@@ -1,5 +1,6 @@
1
import hal
2
import time
3
+import warnings
4
import wpilib
5
6
@@ -18,13 +19,21 @@ class PreciseDelay:
18
19
while something:
20
# do things here
21
delay.wait()
22
+
23
+ .. deprecated:: 2019
24
+ PreciseDelay is terribly inefficient. Use :class:`NotifierDelay` instead.
25
"""
26
27
def __init__(self, delay_period):
28
29
:param delay_period: The amount of time (in seconds) to do a delay
30
:type delay_period: float
31
32
+ warnings.warn(
33
+ "PreciseDelay is deprecated, use NotifierDelay instead.",
34
+ category=DeprecationWarning,
35
+ stacklevel=2,
36
+ )
37
38
# The WPILib sleep/etc functions are slightly less stable as
39
# they have more overhead, so only use them in simulation mode
0 commit comments