From: Fabian Stemmler Date: Thu, 26 Sep 2019 21:49:15 +0000 (+0200) Subject: Merge branch 'development' of https://gitlab.lrz.de/lrr-tum/students/eragp-misim... X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=f554922e3f6ff7bf776101039f30c1e5a2106b2c;p=Mograsim.git Merge branch 'development' of https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into development --- f554922e3f6ff7bf776101039f30c1e5a2106b2c diff --cc plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java index 4a7723ac,b1bfcf3a..94dd5526 --- a/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java +++ b/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/timeline/PauseableTimeFunction.java @@@ -39,16 -38,9 +39,16 @@@ public class PauseableTimeFunction impl : lastPausedInternalTime + (System.nanoTime() / 1000 - unpausedSysTime) * speedFactor); } + @Override + public void setTime(long time) + { + lastPausedInternalTime = time; + unpausedSysTime = System.nanoTime() / 1000; + } + public double getSimulTimeToRealTimeFactor() { - return 1 / 1000 / speedFactor; + return 1 / 1000d / speedFactor; } public void setSpeedFactor(double factor)