#ifndef AVERAGE_TIME_TRACKER_HPP_
#define AVERAGE_TIME_TRACKER_HPP_

#include <list>
#include <cstdint>
#include <cstddef>

/**
 * @brief Keeps track of submitted time samples and calculates an average.
 */
class AverageTimeTracker
{
private:
    static constexpr size_t maxSamples = 120;

    std::list<double> recentSamples;

public:
    void submitSample(double ms);
    double getAverage();
};

#endif