Time: Remove serverside getter, and use atomic operations
authorest31 <MTest31@outlook.com>
Tue, 3 Nov 2015 07:56:56 +0000 (08:56 +0100)
committerest31 <MTest31@outlook.com>
Tue, 3 Nov 2015 18:07:45 +0000 (19:07 +0100)
commitf9b09368f063cdace93a042d5bdd45987c084d94
treeae42f1d9e6a9c0a3370c9badf8bc1e9602fd2a63
parentabc354a5d0a941cf1f3877e487cce325cc609ba8
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/environment.cpp
src/environment.h
src/server.cpp
src/server.h