Skip to content

ARMmbed/mbed-os-snippet-time_HelloWorld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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.

Tip: An online converter between human readable time and Unix Epoch time is useful, such as the EpochConverter.

If the system is not battery powered, the RTC time resets at each power on, or cold reset. Make sure to either provide battery power to keep the time or to set it each time the device starts. During software or warm reset (for example, watchdog reset) RTC counts without interrupt.

There is no official time API. Instead, use the functions in the example code.

MIRRORED FROM MASTER EXAMPLE SNIPPETS REPOSITORY: mbed-os-examples-docs_only. ANY CHANGES MADE DIRECTLY TO THIS REPOSITORY WILL BE AUTOMATICALLY OVERWRITTEN.

About

A mirrored example snippet from mbed-os-examples-docs_only

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages