/// <summary> /// Cancel the timer. /// </summary> /// <param name="throw_on_error">True to throw on error.</param> /// <returns>The previous state.</returns> public NtResult <bool> Cancel(bool throw_on_error) { return(NtSystemCalls.NtCancelTimer(Handle, out bool state).CreateResult(throw_on_error, () => state)); }