Skip to main content

clearTimeout

Function

Clears the timeout with the specified TimeoutID.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

clearTimeout(timeoutID?): void

Clears the timeout with the specified TimeoutID. If the timeout has already completed or the TimeoutID is invalid, this method does nothing.

Parameters

ParameterType
timeoutID?number

Returns

void

Example

const timeoutId = setTimeout(function() {
print("This will not run.");
}, 1000);
clearTimeout(timeoutId);