// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #if defined(NAZARA_PLATFORM_WINDOWS) #include #elif defined(NAZARA_PLATFORM_MACOS) || defined(NAZARA_PLATFORM_IOS) #include #elif defined(NAZARA_PLATFORM_POSIX) #include #else #error OS not handled #endif #include namespace Nz { namespace NAZARA_ANONYMOUS_NAMESPACE { Time GetElapsedNanosecondsFirstRun() { if (InitializeHighPrecisionTimer()) GetElapsedNanoseconds = GetElapsedNanosecondsImpl; else GetElapsedNanoseconds = GetElapsedMillisecondsImpl; return GetElapsedNanoseconds(); } } GetElapsedTimeFunction GetElapsedMilliseconds = GetElapsedMillisecondsImpl; GetElapsedTimeFunction GetElapsedNanoseconds = NAZARA_ANONYMOUS_NAMESPACE_PREFIX(GetElapsedNanosecondsFirstRun); }