libreria taskscheduler.h con rtc3231

La librería hace algo que poco tiene que ver con tu pregunta.

En el readme de TaskScheduler dice:

A lightweight implementation of cooperative multitasking (task scheduling) supporting:

  1. Periodic task execution, with dynamic execution period in milliseconds (default) or microseconds (if explicitly enabled) – frequency of execution
  2. Number of iterations (limited or infinite number of iterations)
  3. Execution of tasks in predefined sequence
  4. Dynamic change of task execution parameters (frequency, number of iterations, callback methods)
  5. Power saving via entering IDLE sleep mode when tasks are not scheduled to run
  6. Support for event-driven task invocation via Status Request object
  7. Support for task IDs and Control Points for error handling and watchdog timer
  8. Support for Local Task Storage pointer (allowing use of same callback code for multiple tasks)
  9. Support for layered task prioritization
  10. Support for std::functions (tested on ESPx only)
  11. Overall task timeout
  12. Static and dynamic callback method binding
  13. CPU load / idle statistics for time critical applications
  14. Scheduling options with priotity for original schedule (with and without catchup) and interval

Punto 1: Ejecución de tareas periódicas, con periódo de ejecución en milisegundos (por defecto) o microsegundos (si se habilita explicitamente en algun .h seguramente).