Skip to main content
Timeout.prototype.refresh - node__timers.d.ts - Node documentation
method Timeout.prototype.refresh

Usage in Deno

```typescript import { Timeout } from "node:node__timers.d.ts"; ```
Timeout.prototype.refresh(): this
Sets the timer's start time to the current time, and reschedules the timer to call its callback at the previously specified duration adjusted to the current time. This is useful for refreshing a timer without allocating a new JavaScript object. Using this on a timer that has already called its callback will reactivate the timer.

Return Type

this
a reference to `timeout`