pid steering
This commit is contained in:
parent
de4e72e344
commit
aacfa61cdb
18
test.py
Normal file
18
test.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import time
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
# t1 = datetime.now()
|
||||||
|
# time.sleep(1.345345)
|
||||||
|
# t2 = datetime.now()
|
||||||
|
# dtmicro=t2-t1
|
||||||
|
# dtms = dtmicro.seconds * 1000 + dtmicro.microseconds//1000
|
||||||
|
|
||||||
|
tprev = datetime.now()
|
||||||
|
|
||||||
|
# while True:
|
||||||
|
tnow = datetime.now()
|
||||||
|
dtmicro = tnow - tprev
|
||||||
|
# dtms = dtmicro.seconds * 1000 + dtmicro.microseconds // 1000
|
||||||
|
dtms = dtmicro.microseconds
|
||||||
|
print(tnow, tprev, dtms)
|
||||||
|
tprev = tnow
|
||||||
Loading…
Reference in a new issue