diff --git a/Runtime/Event.cs b/Runtime/Event.cs
index 61fa47d..79b03e1 100644
--- a/Runtime/Event.cs
+++ b/Runtime/Event.cs
@@ -1,3 +1,4 @@
+using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
@@ -8,8 +9,13 @@ namespace SkyHook
///
[StructLayout(LayoutKind.Sequential)]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
- public struct SkyHookEvent
+ public readonly struct SkyHookEvent
{
+ ///
+ /// Epoch ticks to append in .
+ ///
+ private static readonly long EpochTicks = new DateTime(1970, 1, 1).Ticks;
+
///
/// Precise time of the key's state update in seconds.
///
@@ -30,6 +36,13 @@ namespace SkyHook
/// The key number that was pressed or released.
///
public readonly ushort Key;
+
+ ///
+ /// Returns the sum of and in ticks.
+ ///
+ /// The sum of and in ticks.
+ public long GetTimeInTicks()
+ => (TimeSec * 10000000) + (TimeSubsecNano / 100) + EpochTicks;
}
///