comments for Doxygen all private Libs
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @file debugTimes.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Inherits a class to measure times of functions.
|
||||
* @version 0.1
|
||||
* @date 2021-12-13
|
||||
*
|
||||
* @copyright Copyright (c) 2021
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DEBUG_TIMES_H
|
||||
#define DEBUG_TIMES_H
|
||||
|
||||
@@ -6,10 +17,44 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
/**
|
||||
* @brief A class to measure times of functions.
|
||||
*
|
||||
* This simple class only save the value of the millis()
|
||||
* function when you call the constructor or restart().
|
||||
* To get the elapsed time call stop() or stopConsol().
|
||||
*
|
||||
* @warning This class is not very accurate
|
||||
* It only give you the time in milliseconds.
|
||||
*/
|
||||
class DebugTimes {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Debug Times object
|
||||
* Starts to count milliseconds
|
||||
*/
|
||||
|
||||
DebugTimes();
|
||||
void stop(const char* name, uint16_t minTime = 0);
|
||||
/**
|
||||
* @brief Set the counter to 0
|
||||
*/
|
||||
|
||||
void restart();
|
||||
|
||||
/**
|
||||
* @brief Give the elapsed time
|
||||
*
|
||||
* @return uint16_t elapsed milliseconds
|
||||
*/
|
||||
uint16_t stop();
|
||||
|
||||
/**
|
||||
* @brief Print the elapsed time to consol
|
||||
*
|
||||
* @param name Functionname to print
|
||||
* @param minTime A minimum time before printing
|
||||
*/
|
||||
void stopConsol(const char* name, uint16_t minTime = 0);
|
||||
|
||||
private:
|
||||
uint64_t startTime;
|
||||
|
||||
Reference in New Issue
Block a user