[wpilib] Improve Notifier docs (NFC) (#4326)

This commit is contained in:
Tyler Veness
2022-07-01 06:45:00 -07:00
committed by GitHub
parent add00a96ed
commit faa29d596c
2 changed files with 19 additions and 0 deletions

View File

@@ -19,6 +19,13 @@
namespace frc {
/**
* Notifiers run a callback function on a separate thread at a specified period.
*
* If StartSingle() is used, the callback will run once. If StartPeriodic() is
* used, the callback will run repeatedly with the given period until stop() is
* called.
*/
class Notifier {
public:
/**
@@ -95,6 +102,9 @@ class Notifier {
* interrupt occurs, the event will be immediately requeued for the same time
* interval.
*
* The user-provided callback should be written in a nonblocking manner so the
* callback can be recalled at the next periodic event notification.
*
* @param period Period to call the handler starting one period
* after the call to this method.
*/