Module time - Time utilities

Time utilities.

occam TIMERs measure a INT count of timer ticks that wraps around periodically. The length of a timer tick varies between platforms; on 32-bit platforms it's typically one microsecond (one million ticks per second), and on 16-bit platforms typically one millisecond (one thousand ticks per second).

Using this module, you can write programs that are largely independent of the timer resolution.

Index

Declarations

time.inc:37Function seconds

INT INLINE FUNCTION seconds (VAL INT s)

Convert seconds to timer ticks.

Parameters:

VAL INT s Time in seconds

Returns:

INT Time in timer ticks

time.inc:52Function milliseconds

INT INLINE FUNCTION milliseconds (VAL INT ms)

Convert milliseconds to timer ticks.

Parameters:

VAL INT ms Time in milliseconds

Returns:

INT Time in timer ticks

time.inc:67Function microseconds

INT INLINE FUNCTION microseconds (VAL INT us)

Convert microseconds to timer ticks.

Parameters:

VAL INT us Time in microseconds

Returns:

INT Time in timer ticks

time.occ:27Process delay

PROC delay (VAL INT ticks)

Wait for a period of time.

Parameters:

VAL INT ticks The delay in timer ticks

time.occ:44Process delay.ms

PROC delay.ms (VAL INT ms)

Wait for a period of time.

Parameters:

VAL INT ms The delay in milliseconds