Henglos IO
Built-in packages

Time

Waits, measures and paces: delays, the board's clock, timers and intervals that run part of a loop on a fixed rhythm.

Waits, measures and paces: delays, the board's clock, timers and intervals that run part of a loop on a fixed rhythm.

@henglosio/component-timev1.0.0platform ^1.0.0
NodeKindWhat it does
Timer TriggerTriggerRuns its branch every Interval — on its own, alongside whatever Start does.
DelayActionWaits for the given duration, then continues.
UptimeActionReads the board's clock — milliseconds since it started.
Start TimerActionStarts (or restarts) a named timer.
ElapsedActionHow long since Start Timer started the timer with this name.
EveryActionGoes out Due once every interval, Waiting the rest of the time — runs part of a looping program on a fixed rhythm without blocking the rest.

Triggers

Timer Trigger

Runs its branch every Interval — on its own, alongside whatever Start does.

A trigger: no input, one Out — the first action of its branch.

Settings

SettingTypeDefaultWhat it's for
IntervalNumber (from 10)1000Required. Time between runs, in milliseconds (10 at least).

Publishes

OutputTypeWhat it is
countintHow many times it fired since the program started.

Actions

Delay

Waits for the given duration, then continues.

Settings

SettingTypeDefaultWhat it's for
DurationNumber1000How long to wait, in Unit.
UnitOne of: Milliseconds, Seconds, MinutesMillisecondsUnit of Duration.

Publishes

OutputTypeWhat it is
durationintThe time waited, in milliseconds.

Uptime

Reads the board's clock — milliseconds since it started.

Settings

No settings.

Publishes

OutputTypeWhat it is
uptimeintMilliseconds since the board started (wraps around after ~12 days).

Start Timer

Starts (or restarts) a named timer. Read it later with Elapsed.

Settings

SettingTypeDefaultWhat it's for
NameTexttimerWhich timer — Elapsed reads it by this same name.

Elapsed

How long since Start Timer started the timer with this name.

Settings

SettingTypeDefaultWhat it's for
NameTexttimerThe timer to read, as named in Start Timer.

Publishes

OutputTypeWhat it is
elapsedintMilliseconds since the timer started.

Every

Goes out Due once every interval, Waiting the rest of the time — runs part of a looping program on a fixed rhythm without blocking the rest.

Ends on Due, Waiting — or Fallback when it can't run.

Settings

SettingTypeDefaultWhat it's for
IntervalNumber1000How often to go out Due, in Unit.
UnitOne of: Milliseconds, Seconds, MinutesMillisecondsUnit of Interval.
NameTexteveryAdvanced. Tells several Every apart — each name keeps its own rhythm.

Publishes

OutputTypeWhat it is
elapsedintMilliseconds since the last time it went out Due.

On this page