From f9b09368f063cdace93a042d5bdd45987c084d94 Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 3 Nov 2015 08:56:56 +0100 Subject: Time: Remove serverside getter, and use atomic operations It isn't possible to use atomic operations for floats, so don't use them there. Having a lock is good out of other reasons too, because this way the float time and the integer time both match, and can't get different values in a race, e.g. when two setTimeofDay() get executed simultaneously. --- src/server.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 327591c60..8c42ab5fd 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1232,11 +1232,6 @@ void Server::setTimeOfDay(u32 time) m_time_of_day_send_timer = 0; } -u32 Server::getTimeOfDay() -{ - return m_env->getTimeOfDay(); -} - void Server::onMapEditEvent(MapEditEvent *event) { if(m_ignore_map_edit_events) -- cgit v1.2.3