esp_idf_sys

Function esp_timer_dump

Source
pub unsafe extern "C" fn esp_timer_dump(
    stream: *mut FILE,
) -> esp_err_t
Expand description

@brief Dump the list of timers to a stream

By default, this function prints the list of active (running) timers. The output format is:

| Name | Period | Alarm |

  • Name — timer pointer
  • Period — period of timer in microseconds, or 0 for one-shot timer
  • Alarm - time of the next alarm in microseconds since boot, or 0 if the timer is not started

To print the list of all created timers, enable Kconfig option CONFIG_ESP_TIMER_PROFILING. In this case, the output format is:

| Name | Period | Alarm | Times_armed | Times_trigg | Times_skip | Cb_exec_time |

  • Name — timer name
  • Period — same as above
  • Alarm — same as above
  • Times_armed — number of times the timer was armed via esp_timer_start_X
  • Times_triggered - number of times the callback was triggered
  • Times_skipped - number of times the callback was skipped
  • Callback_exec_time - total time taken by callback to execute, across all calls

@param stream stream (such as stdout) to which to dump the information @return - ESP_OK on success - ESP_ERR_NO_MEM if can not allocate temporary buffer for the output