Introduced getters for executionSpeed
[Mograsim.git] / plugins / net.mograsim.logic.core / src / net / mograsim / logic / core / timeline / PauseableTimeFunction.java
index 4a7723a..04c0fc8 100644 (file)
@@ -48,13 +48,18 @@ public class PauseableTimeFunction implements TimeFunction
 
        public double getSimulTimeToRealTimeFactor()
        {
-               return 1 / 1000 / speedFactor;
+               return 1 / 1000d / speedFactor;
+       }
+
+       public double getSpeedFactor()
+       {
+               return speedFactor;
        }
 
        public void setSpeedFactor(double factor)
        {
                if (factor <= 0)
-                       throw new IllegalArgumentException("time factor can't be smaller than 1");
+                       throw new IllegalArgumentException("time factor can't be less than or equal to 0");
                if (!paused)
                {
                        pause();