1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
7 using System
.Runtime
.InteropServices
;
8 using System
.Runtime
.CompilerServices
;
12 partial struct DateTime
14 public static DateTime UtcNow
18 long ticks
= GetSystemTimeAsFileTime();
19 return new DateTime(((UInt64
)(ticks
+ FileTimeOffset
)) | KindUtc
);
23 [MethodImplAttribute(MethodImplOptions
.InternalCall
)]
24 internal static extern long GetSystemTimeAsFileTime();
26 internal Int64
ToBinaryRaw() => (Int64
)_dateData
;