bpo-31904: Add time module support for VxWorks RTOS by pxinwr · Pull Request #12305 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/library/time.rst
6 changes: 5 additions & 1 deletion Lib/test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def check_ns(sec, ns):
check_ns(time.clock_gettime(time.CLOCK_REALTIME),
time.clock_gettime_ns(time.CLOCK_REALTIME))

@unittest.skipUnless(hasattr(time, 'clock'),
'need time.clock()')
def test_clock(self):
with self.assertWarns(DeprecationWarning):
time.clock()
Expand Down Expand Up @@ -549,7 +551,9 @@ def test_localtime_failure(self):
self.assertRaises(ValueError, time.ctime, float("nan"))

def test_get_clock_info(self):
clocks = ['clock', 'monotonic', 'perf_counter', 'process_time', 'time']
clocks = ['monotonic', 'perf_counter', 'process_time', 'time']
if hasattr(time, 'clock'):
clocks.append('clock')

for name in clocks:
if name == 'clock':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add time module support and fix test_time faiures for VxWorks.
11 changes: 7 additions & 4 deletions Modules/timemodule.c