Interface: moteiv.tos.lib.timer.LocalTime

interface LocalTime<typedef precision_tag>

A LocalTime interface counts time in some units. If you need to detect time overflow, you should use a component offering the Counter interface.

The LocalTime interface 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.

See TEP102 for more details.

Parameters:
precision_tag - A type indicating the precision of this Counter.
Author:
Cory Sharp <cssharp@eecs.berkeley.edu>

Commands
command uint32_t get() Return current time.

Commands - Details

get

command uint32_t get()

Return current time. Time starts counting at boot - some time sources may stop counting while the processor is in low-power mode.

Returns:
Current time.