Compare commits
No commits in common. "5de84414d265352dfc338ef59fc879ba025157a5" and "2c1c425924e0f7d5bb0804a52bf39e3b2da16e5e" have entirely different histories.
5de84414d2
...
2c1c425924
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -9,17 +8,12 @@ namespace SkyHook
|
|||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public readonly struct SkyHookEvent
|
||||
public struct SkyHookEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Epoch ticks to append in <see cref="GetTimeInTicks"/>.
|
||||
/// </summary>
|
||||
private static readonly long EpochTicks = new DateTime(1970, 1, 1).Ticks;
|
||||
|
||||
/// <summary>
|
||||
/// Precise time of the key's state update in seconds.
|
||||
/// </summary>
|
||||
public readonly long TimeSec;
|
||||
public readonly ulong TimeSec;
|
||||
/// <summary>
|
||||
/// Precise time of the key's state update but only contains nanoseconds.
|
||||
/// </summary>
|
||||
|
@ -36,13 +30,6 @@ namespace SkyHook
|
|||
/// The key number that was pressed or released.
|
||||
/// </summary>
|
||||
public readonly ushort Key;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the sum of <see cref="TimeSec"/> and <see cref="TimeSubsecNano"/> in ticks.
|
||||
/// </summary>
|
||||
/// <returns>The sum of <see cref="TimeSec"/> and <see cref="TimeSubsecNano"/> in ticks.</returns>
|
||||
public long GetTimeInTicks()
|
||||
=> (TimeSec * 10000000) + (TimeSubsecNano / 100) + EpochTicks;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Reference in New Issue