Interface: moteiv.tos.lib.timer.BusyWait

interface BusyWait<typedef precision_tag, typedef size_type>

BusyWait is a low-level interface intended for busy waiting for short durations.

BusyWait is parameterised by its "precision" (milliseconds, microseconds, etc), identified by a type. This prevents, e.g., unintentionally mixing components expecting milliseconds with those expecting microseconds as those interfaces have a different type.

BusyWait's second parameter is its "width", i.e., the number of bits used to represent time values. Width is indicated by including the appropriate size integer type as a BusyWait parameter.

See TEP102 for more details.

Parameters:
precision_tag - A type indicating the precision of this BusyWait interface.
size_type - An integer type representing time values for this BusyWait interface.
Author:
Cory Sharp <cssharp@eecs.berkeley.edu>

Commands
command void wait(size_type dt) Busy wait for (at least) dt time units.

Commands - Details

wait

command void wait(size_type dt)

Busy wait for (at least) dt time units. Use sparingly, when the cost of using an Alarm or Timer would be too high.

Parameters:
dt - Time to busy wait for.