# Timer

class `Util.``Timer`()

  This class represents a single time-delayed action.

  ## Index

  Constructors

  - `constructor`

  Methods

  - `clear`
  - `isIdle`
  - `set`
  - `waitForIdle`

## Constructors

`Util.Timer.``constructor`()
  Timer(): `Timer`

  Returns: `Timer`

## Methods

`Util.Timer.``clear`()
  clear(): void

  Clears the pending action if it exists.

  Returns: void

`Util.Timer.``isIdle`()
  isIdle(type: `TimerIdleType`): boolean

  Returns true if no pending action exists and false otherwise.

  Parameters

  > type: `TimerIdleType`

  Returns: boolean

`Util.Timer.``set`()
  set(delay: number, action: () => void): void

  Sets a new delayed action. If one is already pending before this call is made, it gets cleared.

  Parameters

  > delay: number

  > > The delay in milliseconds to pend the action.

  > action: () => void

  > > The action to pend.

  Returns: void

`Util.Timer.``waitForIdle`()
  waitForIdle(type: `TimerIdleType`): Promise

  Returns a promise that resolves when the timer becomes (or already is) idle.

  Parameters

  > type: `TimerIdleType`

  Returns: Promise

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...