mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
os: structured timestamp in Rtc session
Instead of returning an uint64_t value, return a structured time stamp. This change is only visible to components using Rtc_session directly. Fixes #1381.
This commit is contained in:
committed by
Christian Helmuth
parent
6d2c697da1
commit
0a835e4ce9
@ -26,11 +26,11 @@ int main(int argc, char **argv)
|
||||
static Timer::Connection timer;
|
||||
|
||||
for (unsigned i = 0; i < 4; ++i) {
|
||||
Genode::uint64_t now = rtc.current_time();
|
||||
Rtc::Timestamp now = rtc.current_time();
|
||||
|
||||
Genode::printf("RTC: %llu.%06llu seconds since 1970\n",
|
||||
now / 1000000ULL,
|
||||
now % 1000000ULL);
|
||||
Genode::printf("RTC: %u-%02u-%02u %02u:%02u:%02u\n",
|
||||
now.year, now.month, now.day,
|
||||
now.hour, now.minute, now.second);
|
||||
|
||||
timer.msleep(1000);
|
||||
}
|
||||
|
Reference in New Issue
Block a user