#ifndef SCMT_CHECKPOINT_H_
#define SCMT_CHECKPOINT_H_

#include "scmt_config.h"

#if 1 == (MEASURE_TIME)

/* Store a checkpoint:
   Fetch current counter value and store it together with:
    - note:    A pointer to a STATIC string. String must still be available when print_time_checkpoints() is called!
    - data:    Arbitrary data for later analysis (e.g. amount of data transferred) */
void store_time_checkpoint(char * note, uint32_t data);

/* Print checkpoints:
   Outputs all measurements to serial output. */
void print_time_checkpoints(void);

#else
/* If measurement is disabled, still provide empty functions, so user won't need to comment out all function calls. */

void store_time_checkpoint(char * note, uint32_t data) {}
void print_time_checkpoints(void) {}

#endif /* MEASURE_TIME */

#endif
