liveBook · Manning

Timer

A timer is a hardware or software mechanism that tracks time and triggers an event or action after a specified duration or at scheduled intervals.

How 4 Manning books explain it

Web Components in Action

A timer is a program mechanism that schedules code to execute after a delay or at recurring intervals.

How it is used
Uses timers to update custom-element state, drive visual countdowns, and stop work when components leave the DOM.
How deep it goes
Explains interval and frame scheduling through working components, then addresses lifecycle cleanup without detailing browser timer internals.
Examples
Demonstrates numeric countdowns, shrinking visual components, removed elements, and timed CSS shaking.
What you can do after
Apply it via JavaScript browser APIs to schedule updates, animate components, and clean up interval or timeout handles.

Read how Web Components in Action explains timer →

React Quickly, Second Edition

A timer is a runtime mechanism that schedules or repeats execution after a time interval.

How it is used
Uses timers to build React stopwatches, countdowns, and interactive timer interfaces.
How deep it goes
Explains interval setup, state updates, dependency-driven restarts, cleanup, and timing limits without pursuing precision implementation.
Examples
Demonstrates a ticking stopwatch, a pausable countdown, and a componentized timer project.
What you can do after
Build it from scratch with useEffect, useState, setInterval, and clearInterval, then improve precision with performance.now().

Read how React Quickly, Second Edition explains timer →

Akka in Action, Second Edition

A timer is a scheduling mechanism that sends a specified message after a configured delay, typically once or repeatedly.

How it is used
Schedules internal actor messages for delayed lifecycle actions and validation deadlines.
How deep it goes
Demonstrates one-shot scheduling through `Behaviors.withTimers` and `startSingleTimer`, without detailing repeated timers.
Examples
Uses a wallet that reactivates after deactivation and a bet that times out pending market and funds validations.
What you can do after
Apply it via Akka `TimerScheduler` to send a delayed protocol message without blocking an actor.

Read how Akka in Action, Second Edition explains timer →

Secrets of the JavaScript Ninja, Second Edition

A host-environment scheduling mechanism for running code after a delay or at repeated intervals.

How it is used
Keeps browser interfaces responsive by splitting expensive processing into smaller scheduled tasks.
How deep it goes
Demonstrates chunk size, iteration tracking, and recursive setTimeout scheduling in a worked DOM example.
Examples
Uses a 20,000-row table with six cells per row, first built synchronously and then in four timer-scheduled chunks.
What you can do after
Apply setTimeout to divide long-running DOM work into batches that are less likely to block interaction.

Read how Secrets of the JavaScript Ninja, Second Edition explains timer →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.