<commit_before>﻿using System.Diagnostics;
using System.Threading;
using NUnit.Framework;
using SupaCharge.Testing;

namespace SupaCharge.UnitTests.Core.DiagnosticAbstractions {
  [TestFixture]
  public class StopwatchTimestampConversionTest : BaseTestCase {
    [Test]
    public void TestConversion() {
      var ticksPerSecond = Stopwatch.Frequency;
      var ticksPerMillisecond = ticksPerSecond / 1000;
      var sample1 = Stopwatch.GetTimestamp();
      Thread.Sleep(250);
      var sample2 = Stopwatch.GetTimestamp();
      Assert.That((sample2 - sample1) / ticksPerMillisecond, Is
                                                               .GreaterThan(240)
                                                               .And
                                                               .LessThan(255));
      Thread.Sleep(125);
      var sample3 = Stopwatch.GetTimestamp();
      Assert.That((sample3 - sample1) / ticksPerMillisecond, Is
                                                               .GreaterThan(370)
                                                               .And
                                                               .LessThan(395));
      Assert.That((sample3 - sample2) / ticksPerMillisecond, Is
                                                               .GreaterThan(120)
                                                               .And
                                                               .LessThan(150));
    }
  }
}<commit_msg>increased time window on test<commit_after>﻿using System.Diagnostics;
using System.Threading;
using NUnit.Framework;
using SupaCharge.Testing;

namespace SupaCharge.UnitTests.Core.DiagnosticAbstractions {
  [TestFixture]
  public class StopwatchTimestampConversionTest : BaseTestCase {
    [Test]
    public void TestConversion() {
      var ticksPerSecond = Stopwatch.Frequency;
      var ticksPerMillisecond = ticksPerSecond / 1000;
      var sample1 = Stopwatch.GetTimestamp();
      Thread.Sleep(250);
      var sample2 = Stopwatch.GetTimestamp();
      Assert.That((sample2 - sample1) / ticksPerMillisecond, Is
                                                               .GreaterThan(240)
                                                               .And
                                                               .LessThan(255));
      Thread.Sleep(125);
      var sample3 = Stopwatch.GetTimestamp();
      Assert.That((sample3 - sample1) / ticksPerMillisecond, Is
                                                               .GreaterThan(370)
                                                               .And
                                                               .LessThan(400));
      Assert.That((sample3 - sample2) / ticksPerMillisecond, Is
                                                               .GreaterThan(120)
                                                               .And
                                                               .LessThan(150));
    }
  }
}
{'fraction_non_alphanumeric': 0.068359375, 'fraction_numerical': 0.024088541666666668, 'mean_word_length': 0.9511111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658242', 'n_tokens_mistral': 653, 'n_tokens_neox': 590, 'n_words': 120}