<commit_before>#ifndef _TIME_API_H_
#define _TIME_API_H_
#include <stdio.h>
#include <stdlib.h>                /* atoi                              */
#include <stdbool.h>               /* bool, true, false                 */
#include <string.h>                /* memset                            */
#include <assert.h>                /* assert                            */
#include <limits.h>                /* INT_MAX                           */
#include <stdint.h>                /* uint64_t                          */
#include <inttypes.h>              /* PRIu64                            */
#include <time.h>                  /* timespec, clock_gettime           */
#include <errno.h>                 /* errno                             */

#ifdef __cplusplus
extern "C" {
#endif

#include "compiler_api.h"          /* likely(), unlikely()              */
#include "atomic.h"                /* rdtsc                             */

#define MILLION (1000000)          /* 10^6                              */
#define BILLION (1000000000ULL)    /* 10^9                              */
#define NANOSEC_PER_SEC BILLION

struct time_api_t {
   struct timespec start;
   struct timespec end;
   uint64_t time_ns;
};

struct tsc_api_t {
   uint64_t start;
   uint64_t end;
   uint64_t tsc_diff;
};

#define TIME_API_MAX_TIME_UNITS (sizeof(time_unit)/sizeof(char *))
#define TIME_API_SECONDS_UNIT   (3)
#ifndef TIME_API_MODE
#define TIME_API_MODE           (CLOCK_REALTIME)<commit_msg>CI - get time_api.h to compile with Travis<commit_after>#ifndef _TIME_API_H_
#define _TIME_API_H_
#include <stdio.h>
#include <stdlib.h>                /* atoi                              */
#include <stdbool.h>               /* bool, true, false                 */
#include <string.h>                /* memset                            */
#include <assert.h>                /* assert                            */
#include <limits.h>                /* INT_MAX                           */
#include <stdint.h>                /* uint64_t                          */
#define __STDC_FORMAT_MACROS 1     /* activate PRIu64                   */
#include <inttypes.h>              /* PRIu64                            */
#include <time.h>                  /* timespec, clock_gettime           */
#include <errno.h>                 /* errno                             */

#ifdef __cplusplus
extern "C" {
#endif

#include "compiler_api.h"          /* likely(), unlikely()              */
#include "atomic.h"                /* rdtsc                             */

#define MILLION (1000000)          /* 10^6                              */
#define BILLION (1000000000ULL)    /* 10^9                              */
#define NANOSEC_PER_SEC BILLION

struct time_api_t {
   struct timespec start;
   struct timespec end;
   uint64_t time_ns;
};

struct tsc_api_t {
   uint64_t start;
   uint64_t end;
   uint64_t tsc_diff;
};

#define TIME_API_MAX_TIME_UNITS (sizeof(time_unit)/sizeof(char *))
#define TIME_API_SECONDS_UNIT   (3)
#ifndef TIME_API_MODE
#define TIME_API_MODE           (CLOCK_REALTIME)
{'fraction_non_alphanumeric': 0.10298895386614684, 'fraction_numerical': 0.024366471734892786, 'mean_word_length': 1.2008577555396711, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3465319', 'n_tokens_mistral': 962, 'n_tokens_neox': 888, 'n_words': 186}