<commit_before>#ifndef HNETD_H
#define HNETD_H

#include <stddef.h>
#include <stdint.h>
#include <time.h>
#include <sys/types.h>
#include <libubox/utils.h>


typedef int64_t hnetd_time_t;
#define HNETD_TIME_MAX INT64_MAX
#define HNETD_TIME_PER_SECOND 1000

// Get current monotonic clock with millisecond granularity
static inline hnetd_time_t hnetd_time(void) {
	struct timespec ts;
	clock_gettime(CLOCK_MONOTONIC, &ts);
	return ((hnetd_time_t)ts.tv_sec * 1000) +
			((hnetd_time_t)ts.tv_nsec / 1000000);
}
<commit_msg>hnetd: use HNETD_TIME_PER_SECOND more consistently<commit_after>#ifndef HNETD_H
#define HNETD_H

#include <stddef.h>
#include <stdint.h>
#include <time.h>
#include <sys/types.h>
#include <libubox/utils.h>


typedef int64_t hnetd_time_t;
#define HNETD_TIME_MAX INT64_MAX
#define HNETD_TIME_PER_SECOND 1000

// Get current monotonic clock with millisecond granularity
static inline hnetd_time_t hnetd_time(void) {
	struct timespec ts;
	clock_gettime(CLOCK_MONOTONIC, &ts);
	return ((hnetd_time_t)ts.tv_sec * HNETD_TIME_PER_SECOND) +
			((hnetd_time_t)ts.tv_nsec / (1000000000 / HNETD_TIME_PER_SECOND));
}

{'fraction_non_alphanumeric': 0.10329474621549421, 'fraction_numerical': 0.03294746215494212, 'mean_word_length': 6.394736842105263, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '703950', 'n_tokens_mistral': 516, 'n_tokens_neox': 472, 'n_words': 93}