Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
8192310d
Commit
8192310d
authored
Sep 27, 2015
by
Daniel Campora
Browse files
tests/wipy: Improve robustness of time test.
parent
ef369249
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/wipy/time.py
View file @
8192310d
...
...
@@ -61,12 +61,12 @@ spot_test(-1072915201, (1965, 12, 31, 23, 59, 59, 4, 365))
t1
=
time
.
time
()
time
.
sleep
(
2
)
t2
=
time
.
time
()
print
(
time
.
ticks_diff
(
t1
,
t2
)
=
=
2
)
print
(
abs
(
time
.
ticks_diff
(
t1
,
t2
)
-
2
)
<
=
1
)
t1
=
time
.
ticks_ms
()
time
.
sleep_ms
(
50
)
t2
=
time
.
ticks_ms
()
print
(
time
.
ticks_diff
(
t1
,
t2
)
==
50
)
print
(
abs
(
time
.
ticks_diff
(
t1
,
t2
)
-
50
)
<=
1
)
t1
=
time
.
ticks_us
()
time
.
sleep_us
(
1000
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment