<commit_before>﻿using System;
using JetBrains.Annotations;
using TestableFileSystem.Interfaces;

namespace TestableFileSystem.Fakes
{
    public sealed class SystemClock
    {
        [NotNull]
        public static readonly SystemClock Default = new SystemClock();

        [NotNull]
        public Func<DateTime> UtcNow = () => DateTime.UtcNow;

        private SystemClock()
        {
        }

        public SystemClock([NotNull] Func<DateTime> utcNow)
        {
            Guard.NotNull(utcNow, nameof(utcNow));
            UtcNow = utcNow;
        }
    }
}
<commit_msg>API change: do not expose static clock instance that can be modified, potentially affecting other users unintentionally<commit_after>﻿using System;
using JetBrains.Annotations;
using TestableFileSystem.Interfaces;

namespace TestableFileSystem.Fakes
{
    public sealed class SystemClock
    {
        [NotNull]
        public static readonly Func<DateTime> UseHardwareClock = () => DateTime.UtcNow;

        [NotNull]
        public Func<DateTime> UtcNow { get; set; }

        public SystemClock([NotNull] Func<DateTime> utcNow)
        {
            Guard.NotNull(utcNow, nameof(utcNow));
            UtcNow = utcNow;
        }
    }
}

{'fraction_non_alphanumeric': 0.08538587848932677, 'fraction_numerical': 0.0, 'mean_word_length': 2.638805970149254, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '7116284', 'n_tokens_mistral': 350, 'n_tokens_neox': 343, 'n_words': 84}