<commit_before>#ifndef TIMEDISPLAY_H
#define TIMEDISPLAY_H

#include "TimeDisplay.h"

#include "SecondsRing.h"

#include <graphics.h>
#include <gpio.h>
#include <led-matrix.h>
#include <threaded-canvas-manipulator.h>

#include <ctime>

using namespace rgb_matrix;
using namespace uwhtimer;

TimeDisplay::TimeDisplay(RGBMatrix *M, unsigned DisplayNum)
  : ThreadedCanvasManipulator(M)
  , M(M)
  , DisplayNum(DisplayNum) {}

void TimeDisplay::Run() {
  Color Yellow(255, 255, 0);
  Color Green(0, 255, 0);
  Color Black(0, 0, 0);
  FrameCanvas *Frame = M->CreateFrameCanvas();
  while (running()) {
    unsigned Now = time(nullptr);
    unsigned Secs = Now % 60;
    unsigned Tens = Secs / 10;
    unsigned Ones = Secs % 10;

    // Minutes
    BigNumber::RenderHalfSingle(Frame, DisplayNum, Tens, 1, 2, Green, &Black);
    BigNumber::RenderHalfSingle(Frame, DisplayNum, Ones, 15, 2, Green, &Black);

    // Seconds
    BigNumber::RenderQuarterSingle(Frame, DisplayNum, Tens, 8, 18, Green, &Black);
    BigNumber::RenderQuarterSingle(Frame, DisplayNum, Ones, 15, 18, Green, &Black);

    SecondsRing::Render(Frame, DisplayNum, Secs, Yellow, &Black);
    Frame = M->SwapOnVSync(Frame);
  }
}

#endif<commit_msg>Add colons to TimeDisplay<commit_after>#ifndef TIMEDISPLAY_H
#define TIMEDISPLAY_H

#include "TimeDisplay.h"

#include "SecondsRing.h"

#include <graphics.h>
#include <gpio.h>
#include <led-matrix.h>
#include <threaded-canvas-manipulator.h>

#include <ctime>

using namespace rgb_matrix;
using namespace uwhtimer;

TimeDisplay::TimeDisplay(RGBMatrix *M, unsigned DisplayNum)
  : ThreadedCanvasManipulator(M)
  , M(M)
  , DisplayNum(DisplayNum) {}

void TimeDisplay::Run() {
  Color Yellow(255, 255, 0);
  Color Green(0, 255, 0);
  Color Black(0, 0, 0);
  FrameCanvas *Frame = M->CreateFrameCanvas();
  while (running()) {
    unsigned Now = time(nullptr);
    unsigned Secs = Now % 60;
    unsigned Tens = Secs / 10;
    unsigned Ones = Secs % 10;

    // Minutes
    BigNumber::RenderHalfSingle(Frame, DisplayNum, Tens, 1, 2, Green, &Black);
    BigNumber::RenderHalfSingle(Frame, DisplayNum, Ones, 15, 2, Green, &Black);

    // Seconds
    BigNumber::RenderQuarterSingle(Frame, DisplayNum, Tens, 8, 18, Green, &Black);
    BigNumber::RenderQuarterSingle(Frame, DisplayNum, Ones, 15, 18, Green, &Black);

    // Top Colon
    Frame->SetPixel(7, 20, Green.r, Green.g, Green.b);
    Frame->SetPixel(8, 20, Green.r, Green.g, Green.b);
    Frame->SetPixel(7, 21, Green.r, Green.g, Green.b);
    Frame->SetPixel(8, 21, Green.r, Green.g, Green.b);

    // Bottom Colon
    Frame->SetPixel(7, 23, Green.r, Green.g, Green.b);
    Frame->SetPixel(8, 23, Green.r, Green.g, Green.b);
    Frame->SetPixel(7, 24, Green.r, Green.g, Green.b);
    Frame->SetPixel(8, 24, Green.r, Green.g, Green.b);

    SecondsRing::Render(Frame, DisplayNum, Now, Yellow, &Black);
    Frame = M->SwapOnVSync(Frame);
  }
}

#endif
{'fraction_non_alphanumeric': 0.15130674002751032, 'fraction_numerical': 0.030949105914718018, 'mean_word_length': 4.232014388489208, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 25, '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': '5772952', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1036, 'n_words': 252}