<commit_before><commit_msg>Elapsed<commit_after>package monotime

import (
	"time"
)

type Elapsed struct {
	t0 Time
	x0 int64
}

func NewElapsed() *Elapsed {
	return &Elapsed{Now(), time.Now().UnixNano()}
}

func (t Elapsed) Current() time.Duration {
	n := int64(Now() - t.t0)
	x := time.Now().UnixNano() - t.x0
	if x-2000000000 < n || x+2000000000 > n {
		return time.Duration(n)
	}
	return time.Duration(x)
}
{'fraction_non_alphanumeric': 0.1654501216545012, 'fraction_numerical': 0.0681265206812652, 'mean_word_length': 4.08641975308642, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1384085', 'n_tokens_mistral': 189, 'n_tokens_neox': 171, 'n_words': 37}