-
Notifications
You must be signed in to change notification settings - Fork 26
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
add Time example #76
Conversation
@@ -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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
b385150
to
5e05446
Compare
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
5e05446
to
7f6a569
Compare
Edit file, mostly for for active voice.
There was a problem hiding this 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 👍
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