<commit_before>/**
 * File:            timer.h
 * Namespace:       z::core
 * Description:     Timer class. Because this class uses the
 *                  chrono library, it requires AT LEAST C++11.
 *
 * Required
 * compiler flag:   -std=c++11
 *
 * Author:          <NAME>
 * Email:           <EMAIL>
 * Last modified:   21 Apr. 2017
**/

#pragma once
#ifndef TIMER_H_INCLUDED
#define TIMER_H_INCLUDED

#include <chrono>

namespace z
{
    namespace core
    {
        class timer
        {
            typedef std::chrono::high_resolution_clock high_resolution_clock;
            typedef std::chrono::microseconds _microseconds;
            typedef std::chrono::milliseconds _milliseconds;
            typedef std::chrono::seconds _seconds;

        private:
            high_resolution_clock::time_point start;

        public:
            timer (bool run = true)
            {
                if (run)
                    reset();
            }

            void reset()
            {
                start = high_resolution_clock::now();
            }


            long micros() const
            {
                return (long)(std::chrono::duration_cast<_microseconds>
                        (high_resolution_clock::now() - start)).count();
            }

            long millis() const
            {
                return (long)(std::chrono::duration_cast<_milliseconds>
                        (high_resolution_clock::now() - start)).count();
            }

            long seconds() const
            {
                return (long)(std::chrono::duration_cast<_seconds>
                        (high_resolution_clock::now() - start)).count();
            }
        };
    }
}<commit_msg>made small functions inline<commit_after>/**
 * File:            timer.h
 * Namespace:       z::core
 * Description:     Timer class. Because this class uses the
 *                  chrono library, it requires AT LEAST C++11.
 *
 * Required
 * compiler flag:   -std=c++11
 *
 * Author:          <NAME>
 * Email:           <EMAIL>
 * Last modified:   21 Apr. 2017
**/

#pragma once
#ifndef TIMER_H_INCLUDED
#define TIMER_H_INCLUDED

#include <chrono>

namespace z
{
    namespace core
    {
        class timer
        {
            typedef std::chrono::high_resolution_clock high_resolution_clock;
            typedef std::chrono::microseconds _microseconds;
            typedef std::chrono::milliseconds _milliseconds;
            typedef std::chrono::seconds _seconds;

        private:
            high_resolution_clock::time_point start;

        public:
            timer (bool run = true)
            {
                if (run)
                    reset();
            }

            inline void reset()
            {
                start = high_resolution_clock::now();
            }


            inline long micros() const
            {
                return (long)(std::chrono::duration_cast<_microseconds>
                        (high_resolution_clock::now() - start)).count();
            }

            inline long millis() const
            {
                return (long)(std::chrono::duration_cast<_milliseconds>
                        (high_resolution_clock::now() - start)).count();
            }

            inline long seconds() const
            {
                return (long)(std::chrono::duration_cast<_seconds>
                        (high_resolution_clock::now() - start)).count();
            }
        };
    }
}
{'fraction_non_alphanumeric': 0.10260869565217391, 'fraction_numerical': 0.005797101449275362, 'mean_word_length': 1.5007246376811594, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '3896847', 'n_tokens_mistral': 954, 'n_tokens_neox': 874, 'n_words': 197}