From 86eb3f4a0d5bbe529a1061b890ad3a26e40d2d0a Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 21 Jan 2015 11:52:02 +0100 Subject: [PATCH] rtc: rename get_current_time() to current_time() Issue #1344 --- repos/os/include/rtc_session/client.h | 4 ++-- repos/os/include/rtc_session/rtc_session.h | 6 +++--- repos/os/include/vfs/rtc_file_system.h | 2 +- repos/os/src/drivers/rtc/x86/main.cc | 2 +- repos/os/src/test/rtc/main.cc | 2 +- repos/ports/src/app/seoul/main.cc | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/repos/os/include/rtc_session/client.h b/repos/os/include/rtc_session/client.h index 688410b9b..57a6861df 100644 --- a/repos/os/include/rtc_session/client.h +++ b/repos/os/include/rtc_session/client.h @@ -25,9 +25,9 @@ namespace Rtc { Session_client(Genode::Capability cap) : Genode::Rpc_client(cap) {} - Genode::uint64_t get_current_time() + Genode::uint64_t current_time() { - return call(); + return call(); } }; } diff --git a/repos/os/include/rtc_session/rtc_session.h b/repos/os/include/rtc_session/rtc_session.h index fb5a33a88..a6a0b61c6 100644 --- a/repos/os/include/rtc_session/rtc_session.h +++ b/repos/os/include/rtc_session/rtc_session.h @@ -28,10 +28,10 @@ namespace Rtc { /** * Get microseconds elapsed since 1.1.1970 UTC. */ - virtual Genode::uint64_t get_current_time() = 0; + virtual Genode::uint64_t current_time() = 0; - GENODE_RPC(Rpc_get_current_time, Genode::uint64_t, get_current_time); - GENODE_RPC_INTERFACE(Rpc_get_current_time); + GENODE_RPC(Rpc_current_time, Genode::uint64_t, current_time); + GENODE_RPC_INTERFACE(Rpc_current_time); }; } diff --git a/repos/os/include/vfs/rtc_file_system.h b/repos/os/include/vfs/rtc_file_system.h index 9cc3b940b..d7c18dc8b 100644 --- a/repos/os/include/vfs/rtc_file_system.h +++ b/repos/os/include/vfs/rtc_file_system.h @@ -59,7 +59,7 @@ class Vfs::Rtc_file_system : public Single_file_system Read_result read(Vfs_handle *vfs_handle, char *dst, file_size count, file_size &out_count) override { - time_t t = _rtc.get_current_time() / 1000000ULL; + time_t t = _rtc.current_time() / 1000000ULL; struct tm *tm = localtime(&t); diff --git a/repos/os/src/drivers/rtc/x86/main.cc b/repos/os/src/drivers/rtc/x86/main.cc index c43ff32ab..764150f11 100644 --- a/repos/os/src/drivers/rtc/x86/main.cc +++ b/repos/os/src/drivers/rtc/x86/main.cc @@ -31,7 +31,7 @@ namespace Rtc { struct Rtc::Session_component : public Genode::Rpc_object { - uint64_t get_current_time() override + uint64_t current_time() override { uint64_t ret = Rtc::get_time(); diff --git a/repos/os/src/test/rtc/main.cc b/repos/os/src/test/rtc/main.cc index 7bd519ea5..a4cde1886 100644 --- a/repos/os/src/test/rtc/main.cc +++ b/repos/os/src/test/rtc/main.cc @@ -26,7 +26,7 @@ int main(int argc, char **argv) static Timer::Connection timer; for (unsigned i = 0; i < 4; ++i) { - Genode::uint64_t now = rtc.get_current_time(); + Genode::uint64_t now = rtc.current_time(); Genode::printf("RTC: %llu.%06llu seconds since 1970\n", now / 1000000ULL, diff --git a/repos/ports/src/app/seoul/main.cc b/repos/ports/src/app/seoul/main.cc index be53e2439..629ce4ae9 100644 --- a/repos/ports/src/app/seoul/main.cc +++ b/repos/ports/src/app/seoul/main.cc @@ -1133,8 +1133,8 @@ class Machine : public StaticReceiver return true; } } - /* get_current_time is in microseconds */ - msg.wallclocktime = _rtc->get_current_time() / 1000000U * MessageTime::FREQUENCY; + /* current_time() returns microseconds */ + msg.wallclocktime = _rtc->current_time() / 1000000U * MessageTime::FREQUENCY; Logging::printf("Got time %llx\n", msg.wallclocktime); msg.timestamp = _unsynchronized_motherboard.clock()->clock(MessageTime::FREQUENCY);