mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 08:51:19 +01:00
Merge pull request #11095 from benpicco/pyterm_sleep
pyterm: add /sleep function
This commit is contained in:
commit
8a99824e66
8
dist/tools/pyterm/pyterm
vendored
8
dist/tools/pyterm/pyterm
vendored
@ -318,6 +318,14 @@ class SerCmd(cmd.Cmd):
|
||||
date = time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
return ["%s" % (date)]
|
||||
|
||||
def do_PYTERM_sleep(self, line):
|
||||
"""Pyterm command: Sleep for n seconds.
|
||||
"""
|
||||
if line:
|
||||
time.sleep(float(line))
|
||||
else:
|
||||
self.logger.error("sleep: missing operand")
|
||||
|
||||
def do_PYTERM_reset(self, line):
|
||||
"""Pyterm command: Send a reset to the node.
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user