folly::FunctionScheduler: Adding capability to reset a function's timer
Summary:Adding support for resetting a specified function's timer.
"Resetting a function's timer" effectively means "canceling whatever next runs it would have had, and treating it as though it were just added".
When `resetFunctionTimer` is called, the specified function's interval (timer) will be reset, and it will execute after its initially-specified `startDelay`. If the `startDelay` is zero, the function will execute immediately, and then be scheduled as before - once every `interval` milliseconds.
Motivation: batch processing of updates, where both a size and time limit are in play. If the size limit is reached, it makes sense to reset the timer for the scheduled function.
Differential Revision:
D3045868
fb-gh-sync-id:
a5ceb0069c04a77fdab16b61679987ee55484e89
shipit-source-id:
a5ceb0069c04a77fdab16b61679987ee55484e89