mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Timer.start(): Match C++ behavior in Java (#2434)
This commit is contained in:
committed by
GitHub
parent
c926770550
commit
35b236651e
@@ -96,12 +96,15 @@ public class Timer {
|
||||
|
||||
/**
|
||||
* Start the timer running. Just set the running flag to true indicating that all time requests
|
||||
* should be relative to the system clock.
|
||||
* should be relative to the system clock. Note that this method is a no-op if the timer is
|
||||
* already running.
|
||||
*/
|
||||
public void start() {
|
||||
synchronized (m_lock) {
|
||||
m_startTime = getMsClock();
|
||||
m_running = true;
|
||||
if (!m_running) {
|
||||
m_startTime = getMsClock();
|
||||
m_running = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user