rtc: rename get_current_time() to current_time()

Issue #1344
This commit is contained in:
Christian Helmuth 2015-01-21 11:52:02 +01:00
parent 026b5a66c9
commit 86eb3f4a0d
6 changed files with 10 additions and 10 deletions

View File

@ -25,9 +25,9 @@ namespace Rtc {
Session_client(Genode::Capability<Session> cap)
: Genode::Rpc_client<Session>(cap) {}
Genode::uint64_t get_current_time()
Genode::uint64_t current_time()
{
return call<Rpc_get_current_time>();
return call<Rpc_current_time>();
}
};
}

View File

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

View File

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

View File

@ -31,7 +31,7 @@ namespace Rtc {
struct Rtc::Session_component : public Genode::Rpc_object<Session>
{
uint64_t get_current_time() override
uint64_t current_time() override
{
uint64_t ret = Rtc::get_time();

View File

@ -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,

View File

@ -1133,8 +1133,8 @@ class Machine : public StaticReceiver<Machine>
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);