<commit_before>﻿// Nu Game Engine.
// Copyright (C) <NAME>, 2012-2016.

namespace Nu
open System
open System.Diagnostics
open System.Runtime.InteropServices
open System.Configuration
open Prime

[<RequireQualifiedAccess>]
module internal CoreInternal =

#if PLATFORM_AGNOSTIC_TIMESTAMPING
    // NOTE: the risk of using PLATFORM_AGNOSTIC_TIMESTAMPING is two-fold -
    //  1) Stopwatch.GetTimestamp is too low resolution on Windows .NET.
    //  2) Even on Mono, Stopwatch.GetTimestamp, which is ultimately implemented in terms of
    //     mono_100ns_ticks as defined here - https://github.com/mono/mono/blob/master/mono/utils/mono-time.c
    //     does not necessarily lead to a high-resolution, linear-time path on all platforms.
    // Still, a programmer can always pray for his stuff to work in the practical cases...
    
    /// Get a time stamp at the highest-available resolution on linux.
    let internal getTimeStampInternal () =
        Stopwatch.GetTimestamp ()
#else
    /// Query the windows performance counter.
    [<DllImport "Kernel32.dll">]
    extern bool private QueryPerformanceCounter (int64&)

    /// Get a time stamp at the highest-available resolution on windows.<commit_msg>Update Core.fs<commit_after>﻿// Nu Game Engine.
// Copyright (C) <NAME>, 2012-2016.

namespace Nu
open System
open System.Diagnostics
open System.Runtime.InteropServices
open System.Configuration
open Prime

[<RequireQualifiedAccess>]
module internal CoreInternal =

#if PLATFORM_AGNOSTIC_TIMESTAMPING
    // NOTE: the drawbacks of using PLATFORM_AGNOSTIC_TIMESTAMPING are two-fold -
    //  1) Stopwatch.GetTimestamp is too low resolution on Windows .NET.
    //  2) Even on Mono, Stopwatch.GetTimestamp, which is ultimately implemented in terms of
    //     mono_100ns_ticks as defined here - https://github.com/mono/mono/blob/master/mono/utils/mono-time.c
    //     does not necessarily lead to a high-resolution, linear-time path on all platforms.
    
    /// Get a time stamp at the highest-available resolution on linux.
    let internal getTimeStampInternal () =
        Stopwatch.GetTimestamp ()
#else
    /// Query the windows performance counter.
    [<DllImport "Kernel32.dll">]
    extern bool private QueryPerformanceCounter (int64&)

    /// Get a time stamp at the highest-available resolution on windows.
{'fraction_non_alphanumeric': 0.08540772532188841, 'fraction_numerical': 0.014592274678111588, 'mean_word_length': 3.365168539325843, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '6838630', 'n_tokens_mistral': 687, 'n_tokens_neox': 654, 'n_words': 233}