mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Java: Fix Timer.get() handling of accumulated time (#1531)
Fixes #1530.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user