Cancel SetTimeout

Is there a way to cancel a Citizen.SetTimeout call so it stops executing?

I am working on a resource that calls citizen.settimeout to display a message after ‘x’ amount of time after a player takes an action to spawn in a vehicle. However if the player returns the vehicle before x time, the timeout should be canceled.

If there is no way to call a cancel on a settimeout, then I’ll have to go the other route I suppose and do

local spawntime = GetGameTimer()

while true do
if GetGameTimer() - spawntime == milliseconds then
– Display message

but this isn’t as accurate, so hoping I can use settimeout