Java: Fix Timer.get() handling of accumulated time (#1531)

Fixes #1530.
This commit is contained in:
Peter Johnson
2019-01-08 19:43:49 -08:00
committed by GitHub
parent f121ccff0d
commit 444b899a9f

View File

@@ -70,7 +70,7 @@ public class Timer {
*/
public synchronized double get() {
if (m_running) {
return ((getMsClock() - m_startTime) + m_accumulatedTime) / 1000.0;
return m_accumulatedTime + (getMsClock() - m_startTime) / 1000.0;
} else {
return m_accumulatedTime;
}