mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-05 11:53:53 +00:00
fixed bug 316 by setting timer to now-delay in live mode when playing
This commit is contained in:
1 parent
6ec00104fc
commit
7aa941e9e3
1 file changed
+4
-3
@@ -195,10 +195,11 @@ public class Timer {
|
||||
public boolean execute() {
|
||||
if (time != null && playState == PlayStates.Playing) {
|
||||
long newTime = time.getTime();
|
||||
if (playMode == PlayModes.Replay)
|
||||
if (playMode == PlayModes.Replay) {
|
||||
newTime += (long) playSpeedFactor * refreshInterval;
|
||||
else
|
||||
newTime += refreshInterval;
|
||||
} else {
|
||||
newTime = System.currentTimeMillis() - getLivePlayDelayInMillis();
|
||||
}
|
||||
setTime(newTime);
|
||||
}
|
||||
if (refreshIntervalChanged) {
|
||||
|
||||
Reference in new issue
Block a user