Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- /*
- *
- */
- namespace Mu
- {
- // prevents PInvoke (not in NativeMethods class) or Stack walk (NativeMethods class) performance penalties.
- internal static partial class SafeNativeMethods
- {
- [DllImport("kernel32")]
- internal extern static UInt64 GetTickCount64();
- }
- public static class MuTime
- {
- public static UInt64 UpTimeMillis { get { return SafeNativeMethods.GetTickCount64(); } }
- }
- }
- /*
- Copyright (c) 2020 Robin Davies Dual License (use either, not both)
- CC-BY-SA 3.0 (due to StackExchange terms of use). Not my fault, blame StackExchange. Fix this please!
- To avoid CC-BY-SA, access a copy of this code at (xxx) to use under BSD 0-clause license (see end of file)
- BSD 0-clause
- BSD 0-Clause
- Copyright 2020 Robin Davies.
- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
- OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- THIS SOFTWARE.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement