<commit_before>class Delay {
  boolean signal;
  boolean on;

  int hour;
  int minute;
  int second;
  int counter;

  int timerH;
  int timerM;
  int timerS;

  Delay() {
    timerH = 0;
    timerM = 0;
    timerS = 0;
    counter = 59;
    signal = true;
    on = false;
    hour = 0;
    second = 0;
    minute = 0;
  }

  void update() {
    if (!on) {
      return;
    }

    if (timerS > 0 || timerM > 0 || timerH > 0){
      counter--;
    }
    else {
      return;
    }

    if (counter <= 0) {
      counter = 59;
      timerS--;
    }
    else {
      return;
    }

    if (timerS <= 0) {
      timerM--;
      timerS = 59;
    }
    if (timerM <= 0){
      timerH--;
      timerM = 59;
    }
    if (timerH < 0) {
      timerH = 0;
    }

    if (timerS <= 0 && timerM <= 0 && timerH <= 0){
      on = false;
      signal = true;
      timerS = 0;
      timerM = 0;
      timerH = 0;
      counter = 0;
    }

  }

  void activate(int h, int m, int s) {
    on = true;
    signal = false;
    timerH = h;
    timerM = m;<commit_msg>Refactor and reformat Delay.pde for sanity<commit_after>class Delay {
  boolean active;
  boolean signal;

  int hour = 0;
  int minute = 0;
  int second = 0;

  int timerH;
  int timerM;
  int timerS;
  int counter;

  Delay() {
    active = false;
    signal = true;

    timerH = 0;
    timerM = 0;
    timerS = 0;
    counter = 59;
  }

  void update() {
    if (!active) {
      return;
    }

    if (timerS > 0 || timerM > 0 || timerH > 0) {
      counter--;
    }
    else {
      return;
    }

    if (counter <= 0) {
      counter = 59;
      timerS--;
    }
    else {
      return;
    }

    if (timerS <= 0) {
      timerM--;
      timerS = 59;
    }
    if (timerM <= 0) {
      timerH--;
      timerM = 59;
    }
    if (timerH < 0) {
      timerH = 0;
    }

    if (timerS <= 0 && timerM <= 0 && timerH <= 0) {
      active = false;
      signal = true;

      timerH = 0;
      timerM = 0;
      timerS = 0;
      counter = 0;
    }

  }

  void activate(int h, int m, int s) {
    active = true;
    signal = false;

    timerH = h;
    timerM = m;
{'fraction_non_alphanumeric': 0.1350968351440718, 'fraction_numerical': 0.0273972602739726, 'mean_word_length': 1.401360544217687, 'pattern_counts': {'":': 0, '<': 17, '<?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': '5693839', 'n_tokens_mistral': 867, 'n_tokens_neox': 781, 'n_words': 227}