<commit_before>#include "Timer.hpp"

using namespace HomieInternals;

Timer::Timer()
: _initialTime(0)
, _interval(0)
, _tickAtBeginning(false) {
}

void Timer::setInterval(uint32_t interval, bool tickAtBeginning) {
  _interval = interval;
  _tickAtBeginning = tickAtBeginning;

  this->reset();
}

bool Timer::check() const {
  if (_tickAtBeginning && _initialTime == 0) return true;
  if (millis() - _initialTime >= _interval) return true;

  return false;
}

void Timer::reset() {
  if (tickAtBeginning) {
    _initialTime = 0;
  } else {
    this->tick();
  }
}

void Timer::tick() {
  _initialTime = millis();
}<commit_msg>:bug: Add missing underscore - fix last commit<commit_after>#include "Timer.hpp"

using namespace HomieInternals;

Timer::Timer()
: _initialTime(0)
, _interval(0)
, _tickAtBeginning(false) {
}

void Timer::setInterval(uint32_t interval, bool tickAtBeginning) {
  _interval = interval;
  _tickAtBeginning = tickAtBeginning;

  this->reset();
}

bool Timer::check() const {
  if (_tickAtBeginning && _initialTime == 0) return true;
  if (millis() - _initialTime >= _interval) return true;

  return false;
}

void Timer::reset() {
  if (_tickAtBeginning) {
    _initialTime = 0;
  } else {
    this->tick();
  }
}

void Timer::tick() {
  _initialTime = millis();
}
{'fraction_non_alphanumeric': 0.14186046511627906, 'fraction_numerical': 0.009302325581395349, 'mean_word_length': 4.540772532188841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5858715', 'n_tokens_mistral': 468, 'n_tokens_neox': 448, 'n_words': 102}