diff --git a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs new file mode 100644 index 000000000000..e791807daffd --- /dev/null +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; + +internal static partial class Interop +{ + internal static partial class Sys + { + [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimestampResolution")] + internal static extern bool GetTimestampResolution(out long resolution); + + [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimestamp")] + internal static extern bool GetTimestamp(out long timestamp); + } +} diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs similarity index 66% rename from src/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs rename to src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs index a6c9d28054fc..e34baa77a6d3 100644 --- a/src/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs +++ b/src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs @@ -8,12 +8,6 @@ internal static partial class Interop { internal static partial class Sys { - [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimestampResolution")] - internal static extern bool GetTimestampResolution(out long resolution); - - [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimestamp")] - internal static extern bool GetTimestamp(out long timestamp); - [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetAbsoluteTime")] internal static extern bool GetAbsoluteTime(out ulong timestamp); diff --git a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index d6cebb976ce1..5d69a2545d38 100644 --- a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj +++ b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj @@ -383,8 +383,8 @@ Common\System\StringExtensions.cs - - Common\Unix\System.Native\Interop.GetTimestamp.cs + + Common\Unix\System.Native\Interop.GetAbsoluteTime.cs @@ -412,9 +412,6 @@ Common\Interop\FreeBSD\Interop.Process.cs - - Common\Unix\System.Native\Interop.GetTimestamp.cs - Common\Unix\System.Native\Interop.Stat.cs diff --git a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj index 0e607a8f3b7e..63153898514c 100644 --- a/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj +++ b/src/System.Runtime.Extensions/src/System.Runtime.Extensions.csproj @@ -219,7 +219,7 @@ Common\Interop\Unix\System.Native\Interop.GetHostName.cs - + Common\Interop\Unix\System.Native\Interop.GetTimestamp.cs