Skip to content

add Time example #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2020
Merged

Conversation

maciejbocianski
Copy link
Contributor

@maciejbocianski maciejbocianski commented Feb 25, 2020

Move examples:
https://os.mbed.com/teams/mbed_example/code/time_HelloWorld/
to this repo

Update example code to latest API's

Docs update PR: ARMmbed/mbed-os-5-docs#1248

@@ -0,0 +1,6 @@
# Time example

You can use the time interface to access the Real Time Clock (RTC). The time is set as an offset measured in seconds from the time epoch, which is library specific. The accepted time epoch is the Unix Epoch. An online converter between human readable time and Unix Epoch time is handy, try this one. If the system is not battery powered, then on each reset, the RTC time is reset. Make sure to either provide battery power to keep the time or to reset it each time the device is run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query: When we say "try this one," what do we mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I missed links.
Fixed
Also updated description a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mprse please review the description

@@ -0,0 +1,6 @@
# Time example

The time interface is used to access the Real Time Clock (RTC). The time is set as an offset measured in seconds from the time epoch, which is library specific. In general the accepted time epoch is the [Unix Epoch](https://en.wikipedia.org/wiki/Unix_time). An online converter between human readable time and Unix Epoch time is handy, try [this](https://www.epochconverter.com/) one. If the system is not battery powered then on each power-on (cold reset) the rtc time will be reset. Make sure to either provide battery power to keep the time or to reset it each time the device is run. During software or warm reset (e.g watchdog reset) RTC counts without interrupt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to either provide battery power to keep the time or to reset it each time the device is run.
I suggest to change:
Make sure to either provide battery power to keep the time or to set it each time the device is started.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Edit file, mostly for for active voice.
Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 👍

@jamesbeyond jamesbeyond merged commit 7dab47b into ARMmbed:master Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants