timeGetSystemTime

[DllImport("winmm.dll", SetLastError = true)]
public static extern uint timeGetSystemTime(
   IntPtr pmmt,
   uint cbmmt
);

Microsoft documentation: Link

Last updated