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:
Josef Söntgen
2015-01-27 13:56:16 +01:00
committed by Christian Helmuth
parent 6d2c697da1
commit 0a835e4ce9
12 changed files with 94 additions and 76 deletions

View File

@ -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);
}