From 282468b751f43b4e9efe987cf79b699ccfdb6db0 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 1 Feb 2019 20:28:32 +0100 Subject: [PATCH 1/3] Move Interop.GetTimestamp.cs to shared CoreLib partition. --- .../Interop/Unix/System.Native/Interop.GetTimestamp.cs | 0 .../src/System.Diagnostics.Process.csproj | 4 ++-- .../src/System.Runtime.Extensions.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/Common/src/{ => CoreLib}/Interop/Unix/System.Native/Interop.GetTimestamp.cs (100%) diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs similarity index 100% rename from src/Common/src/Interop/Unix/System.Native/Interop.GetTimestamp.cs rename to src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs diff --git a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index d6cebb976ce1..11df8419d1e1 100644 --- a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj +++ b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj @@ -383,7 +383,7 @@ Common\System\StringExtensions.cs - + Common\Unix\System.Native\Interop.GetTimestamp.cs @@ -412,7 +412,7 @@ Common\Interop\FreeBSD\Interop.Process.cs - + Common\Unix\System.Native\Interop.GetTimestamp.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 From 21a0902f6b029670e9364d6c4fdb19617a9ee22f Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 1 Feb 2019 20:53:02 +0100 Subject: [PATCH 2/3] PR feedback --- .../Unix/System.Native/Interop.GetTimestamp.cs | 6 ------ .../System.Native/Interop.GetAbsoluteTime.cs | 17 +++++++++++++++++ .../src/System.Diagnostics.Process.csproj | 8 ++++---- 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs 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 index a6c9d28054fc..e791807daffd 100644 --- a/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs +++ b/src/Common/src/CoreLib/Interop/Unix/System.Native/Interop.GetTimestamp.cs @@ -13,11 +13,5 @@ internal static partial class Sys [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); - - [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimebaseInfo")] - internal static extern bool GetTimebaseInfo(out uint numer, out uint denom); } } diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs b/src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.cs new file mode 100644 index 000000000000..e34baa77a6d3 --- /dev/null +++ b/src/Common/src/Interop/Unix/System.Native/Interop.GetAbsoluteTime.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_GetAbsoluteTime")] + internal static extern bool GetAbsoluteTime(out ulong timestamp); + + [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetTimebaseInfo")] + internal static extern bool GetTimebaseInfo(out uint numer, out uint denom); + } +} diff --git a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index 11df8419d1e1..db4bf7487451 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,8 +412,8 @@ Common\Interop\FreeBSD\Interop.Process.cs - - Common\Unix\System.Native\Interop.GetTimestamp.cs + + Common\Unix\System.Native\Interop.GetAbsoluteTime.cs Common\Unix\System.Native\Interop.Stat.cs From f5878e9b4bcaa58ae01aee42665c4da275154273 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 1 Feb 2019 21:07:19 +0100 Subject: [PATCH 3/3] PR feedback --- .../src/System.Diagnostics.Process.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj index db4bf7487451..5d69a2545d38 100644 --- a/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj +++ b/src/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj @@ -412,9 +412,6 @@ Common\Interop\FreeBSD\Interop.Process.cs - - Common\Unix\System.Native\Interop.GetAbsoluteTime.cs - Common\Unix\System.Native\Interop.Stat.cs