<commit_before>#pragma once

#include <chrono>
#include <polar/math/number.h>

#define ENGINE_TICKS_PER_SECOND 100000

typedef std::chrono::duration<uint64_t, std::ratio<1, ENGINE_TICKS_PER_SECOND>>
    DeltaTicksBase;

class DeltaTicks {
  public:
	using seconds_type = polar::math::decimal;

	DeltaTicksBase value;

	DeltaTicks() = default;
	DeltaTicks(DeltaTicksBase value) : value(value) {}
	DeltaTicks(DeltaTicksBase::rep ticks) : value(ticks) {}

	inline auto Ticks() const { return value.count(); }

	inline auto Seconds() const {
		return value.count() /
		       static_cast<seconds_type>(ENGINE_TICKS_PER_SECOND);
	}

	inline void SetSeconds(const seconds_type &seconds) {
		value = DeltaTicksBase(static_cast<DeltaTicksBase::rep>(
		    seconds * ENGINE_TICKS_PER_SECOND));
	}

	inline bool operator<(const DeltaTicksBase &rhs) { return value < rhs; }
	inline bool operator<(const DeltaTicks &rhs) { return *this < rhs.value; }
	inline bool operator>(const DeltaTicksBase &rhs) { return value < rhs; }
	inline bool operator>(const DeltaTicks &rhs) { return *this < rhs.value; }
	inline bool operator<=(const DeltaTicksBase &rhs) { return !(*this > rhs); }
	inline bool operator<=(const DeltaTicks &rhs) {
		return !(*this > rhs.value);
	}
	inline bool operator>=(const DeltaTicksBase &rhs) { return !(*this < rhs); }
	inline bool operator>=(const DeltaTicks &rhs) {
		return !(*this < rhs.value);
	}

	inline DeltaTicks &operator+=(const DeltaTicksBase &rhs) {
		value += rhs;
		return *this;
	}
	inline DeltaTicks &operator+=(const DeltaTicks &rhs) {
		return *this += rhs.value;
	}
	inline friend DeltaTicks operator+(DeltaTicks lhs,
	                                   const DeltaTicksBase &rhs) {
		return lhs += rhs;
	}
	inline friend DeltaTicks operator+(DeltaTicks lhs, const DeltaTicks &rhs) {
		return lhs += rhs;
	}

	inline DeltaTicks &operator-=(const DeltaTicksBase &rhs) {
		value -= rhs;
		return *this;
	}
	inline DeltaTicks &operator-=(const DeltaTicks &rhs) {
		return *this -= rhs.value;
	}
	inline friend DeltaTicks operator-(DeltaTicks lhs,
	                                   const DeltaTicksBase &rhs) {
		return lhs -= rhs;
	}
	inline friend DeltaTicks operator-(DeltaTicks lhs, const DeltaTicks &rhs) {
		return lhs -= rhs;
	}
};
<commit_msg>DeltaTicks: Add missing consts<commit_after>#pragma once

#include <chrono>
#include <polar/math/number.h>

#define ENGINE_TICKS_PER_SECOND 100000

typedef std::chrono::duration<uint64_t, std::ratio<1, ENGINE_TICKS_PER_SECOND>>
    DeltaTicksBase;

class DeltaTicks {
  public:
	using seconds_type = polar::math::decimal;

	DeltaTicksBase value;

	DeltaTicks() = default;
	DeltaTicks(DeltaTicksBase value) : value(value) {}
	DeltaTicks(DeltaTicksBase::rep ticks) : value(ticks) {}

	inline auto Ticks() const { return value.count(); }

	inline auto Seconds() const {
		return value.count() /
		       static_cast<seconds_type>(ENGINE_TICKS_PER_SECOND);
	}

	inline void SetSeconds(const seconds_type &seconds) {
		value = DeltaTicksBase(static_cast<DeltaTicksBase::rep>(
		    seconds * ENGINE_TICKS_PER_SECOND));
	}

	inline bool operator<(const DeltaTicksBase &rhs) const { return value < rhs; }
	inline bool operator<(const DeltaTicks &rhs) const { return *this < rhs.value; }
	inline bool operator>(const DeltaTicksBase &rhs) const { return value < rhs; }
	inline bool operator>(const DeltaTicks &rhs) const { return *this < rhs.value; }
	inline bool operator<=(const DeltaTicksBase &rhs) const { return !(*this > rhs); }
	inline bool operator<=(const DeltaTicks &rhs) const {
		return !(*this > rhs.value);
	}
	inline bool operator>=(const DeltaTicksBase &rhs) const { return !(*this < rhs); }
	inline bool operator>=(const DeltaTicks &rhs) const {
		return !(*this < rhs.value);
	}

	inline DeltaTicks &operator+=(const DeltaTicksBase &rhs) {
		value += rhs;
		return *this;
	}
	inline DeltaTicks &operator+=(const DeltaTicks &rhs) {
		return *this += rhs.value;
	}
	inline friend DeltaTicks operator+(DeltaTicks lhs,
	                                   const DeltaTicksBase &rhs) {
		return lhs += rhs;
	}
	inline friend DeltaTicks operator+(DeltaTicks lhs, const DeltaTicks &rhs) {
		return lhs += rhs;
	}

	inline DeltaTicks &operator-=(const DeltaTicksBase &rhs) {
		value -= rhs;
		return *this;
	}
	inline DeltaTicks &operator-=(const DeltaTicks &rhs) {
		return *this -= rhs.value;
	}
	inline friend DeltaTicks operator-(DeltaTicks lhs,
	                                   const DeltaTicksBase &rhs) {
		return lhs -= rhs;
	}
	inline friend DeltaTicks operator-(DeltaTicks lhs, const DeltaTicks &rhs) {
		return lhs -= rhs;
	}
};

{'fraction_non_alphanumeric': 0.12010387362042847, 'fraction_numerical': 0.0038952607660679506, 'mean_word_length': 4.090308370044053, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5978419', 'n_tokens_mistral': 1610, 'n_tokens_neox': 1559, 'n_words': 399}