wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.07k stars 611 forks source link

Access running state of Timer #7218

Open etiennebeaulac opened 4 hours ago

etiennebeaulac commented 4 hours ago

There are certain use cases where I would like to be able to check if a Timer is currently running. The class already has the member variable m_running holding that particular state, it would be nice to have a public method returning its value.

If you think this is a good idea, I could proceed to do a PR. Thanks !

PeterJohnson commented 4 hours ago

Seems like a reasonable thing to add. Naming wise, were you thinking isRunning()?

etiennebeaulac commented 4 hours ago

This would have been my guess, yes, since this is already what is used internally.