rtc: be less verbose

Issue #1296
This commit is contained in:
Alexander Boettcher 2014-11-06 08:59:33 +01:00 committed by Christian Helmuth
parent 1a718a7770
commit e6850359e1
1 changed files with 9 additions and 4 deletions

View File

@ -25,6 +25,8 @@
using namespace Genode; using namespace Genode;
static bool verbose = false;
/** /**
* Time helper * Time helper
*/ */
@ -70,7 +72,10 @@ namespace Rtc {
uint64_t get_current_time() uint64_t get_current_time()
{ {
uint64_t ret = get_rtc_time(); uint64_t ret = get_rtc_time();
PINF("Time is: %llx\n", ret);
if (verbose)
PINF("Time is: %llx\n", ret);
return ret; return ret;
} }
@ -82,7 +87,6 @@ namespace Rtc {
Session_component *_create_session(const char *args) Session_component *_create_session(const char *args)
{ {
PDBG("RTC: creating session\n");
return new (md_alloc()) Session_component(); return new (md_alloc()) Session_component();
} }
public: public:
@ -90,7 +94,6 @@ namespace Rtc {
Genode::Allocator *allocator) Genode::Allocator *allocator)
: Genode::Root_component<Session_component>(ep, allocator) : Genode::Root_component<Session_component>(ep, allocator)
{ {
PDBG("RTC: creating root component\n");
} }
}; };
} }
@ -212,7 +215,9 @@ static uint64_t get_rtc_time(void)
if ((year += 1900) < 1970) year += 100; if ((year += 1900) < 1970) year += 100;
PDBG("Date:%02d.%02d.%04d Time:%02d:%02d:%02d\n", day, mon, year, hour, min, sec); if (verbose)
PINF("Date:%02d.%02d.%04d Time:%02d:%02d:%02d\n", day, mon, year,
hour, min, sec);
/* return microseconds */ /* return microseconds */
return mktime(day, mon, year, hour, min, sec) * 1000000ULL; return mktime(day, mon, year, hour, min, sec) * 1000000ULL;