Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fpletz
firmware
Commits
b12e4ef9
Verified
Commit
b12e4ef9
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
chore(docs): Fix utime module docs
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
3efbab13
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Documentation/pycardium/utime.rst
+9
-9
9 additions, 9 deletions
Documentation/pycardium/utime.rst
with
9 additions
and
9 deletions
Documentation/pycardium/utime.rst
+
9
−
9
View file @
b12e4ef9
...
...
@@ -11,34 +11,34 @@ alarm.
.. |time| replace:: ``time``
.. _time: https://docs.python.org/3/library/time.html
.. py:function::
utime.
sleep(secs)
.. py:function:: sleep(secs)
Sleep for ``secs`` seconds. Can take a floating-point value.
.. py:function::
utime.
sleep_ms(msecs)
.. py:function:: sleep_ms(msecs)
Sleep for ``msecs`` milliseconds. Only takes integer values.
.. py:function::
utime.
sleep_us(usecs)
.. py:function:: sleep_us(usecs)
Sleep for ``usecs`` microseconds. Only takes integer values.
.. py:function::
utime.
time()
.. py:function:: time()
Return the current timestamp in seconds since 2000-01-01 00:00.
.. py:function::
utime.
set_time(secs)
.. py:function:: set_time(secs)
Sets the time to ``secs`` seconds since 2000-01-01 00:00.
.. py:function::
utime.
set_unix_time(secs)
.. py:function:: set_unix_time(secs)
Sets the time to ``secs`` seconds since 1970-01-01 00:00 UTC.
This corresponds a regular Unix timestamp which can be obtained
by running ``date +%s`` in a command line or ``int(time.time())``
in Python.
.. py:function::
utime.
localtime([secs])
.. py:function:: localtime([secs])
Return the current time as a timestruct tuple. If ``secs`` is given, return
its timestruct tuple instead. Timestruct tuple looks like:
...
...
@@ -48,14 +48,14 @@ alarm.
(year, month, mday, hour, min, sec, wday, yday)
# 0 1 2 3 4 5 6 7
.. py:function::
utime.
mktime(t)
.. py:function:: mktime(t)
Convert timestruct tuple into a seconds time stamp. See
:py:func:`utime.localtime` for details about timestruct tuples.
:returns: Seconds since 2000-01-01
.. py:function::
utime.
alarm(secs, [callback])
.. py:function:: alarm(secs, [callback])
Register the next RTC alarm for the timestamp ``secs``. ``secs`` is seconds
since 2000-01-01.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment