<commit_before>/* Copyright (C) 2016 <NAME>, all rights reserverd. */

#pragma once

#include "yardstick/yardstick.h"

#if defined(_WIN32)

#include <profileapi.h>

namespace _ys_ {

static inline __forceinline ysTime ReadClock()
{
	LARGE_INTEGER tmp;
	QueryPerformanceCounter(&tmp);
	return tmp.QuadPart;
}

/// Default clock frequency reader.
/// @internal
static inline ysTime GetClockFrequency()
{
	LARGE_INTEGER tmp;
	QueryPerformanceFrequency(&tmp);
	return tmp.QuadPart;
}

} // namespace _ys_

#else // _WIN32
#	error "Unsupported platform"
#endif<commit_msg>Standard C++ implementation for Clock<commit_after>/* Copyright (C) 2016 <NAME>, all rights reserverd. */

#pragma once

#include "yardstick/yardstick.h"

#if defined(_WIN32)

#include <profileapi.h>

namespace _ys_ {

static inline YS_INLINE ysTime ReadClock()
{
	LARGE_INTEGER tmp;
	QueryPerformanceCounter(&tmp);
	return tmp.QuadPart;
}

/// Default clock frequency reader.
/// @internal
static inline ysTime GetClockFrequency()
{
	LARGE_INTEGER tmp;
	QueryPerformanceFrequency(&tmp);
	return tmp.QuadPart;
}

} // namespace _ys_

#else // _WIN32

#include <chrono>

namespace _ys_ {

static inline YS_INLINE ysTime ReadClock()
{
	auto const now = std::chrono::high_resolution_clock::now();
	auto const time = now.time_since_epoch();
	auto const ns = std::chrono::duration_cast<std::chrono::nanoseconds>(time);
	return ns.count();
}

static inline ysTime GetClockFrequency()
{
	return std::nano::den;
}

} // namespace _ys_

#endif
{'fraction_non_alphanumeric': 0.12391738840772819, 'fraction_numerical': 0.010659560293137908, 'mean_word_length': 5.080971659919029, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3039899', 'n_tokens_mistral': 543, 'n_tokens_neox': 518, 'n_words': 131}