Component: Timer (Storage)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Storage


Image Timer component

Allows you to measure the passage of time via the use of a hardware timer peripheral. Works like a stopwatch with macros to start and stop the timer counter. Returns time as integer Seconds, Milliseconds, Microseconds and also Floating Point and String.

Examples

No additional examples


Downloadable macro reference

GetCountSeconds

Returns the count value as a number of whole seconds, rounded down to the nearest second

Parameters

This macro has no parameters


Return value

ULONG


StartCounter

Starts the timer counting.

Parameters

This macro has no parameters


Return value

This call does not return a value


GetCountString

Returns the count value as a floating point string in seconds.

Parameters

This macro has no parameters


Return value

STRING


GetCountMicroSeconds

Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond

Parameters

This macro has no parameters


Return value

ULONG


GetCountMilliseconds

Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond

Parameters

This macro has no parameters


Return value

ULONG


StopCounter

Stops the timer counting.

Parameters

This macro has no parameters


Return value

This call does not return a value


GetCountReal

Returns the count value as a floating point value in seconds.

Parameters

This macro has no parameters


Return value

FLOAT


Simulation macro reference

This component does not contain any simulation macros


Property reference

Timer

This property is of type Fixed list of ints and can be referenced with the variable name Timer.

Timer Peripheral to use to monitor the passage of time.

Bit Depth

This property is of type Unsigned integer and can be referenced with the variable name BitDepth.

Number of bits in the timer peripheral.

8-bit timers can count from 0-255 before overflowing.

16-bit timers can count from 0 to 65535 before overflowing.

Instruction Rate

This property is of type Unsigned integer and can be referenced with the variable name InstructionRate.

No additional information


Rollover Frequency

This property is of type Floating point and can be referenced with the variable name RolloverFreq.

No additional information


Rollover Time

This property is of type Floating point and can be referenced with the variable name RolloverTime.

No additional information


Max Time Measurement

This property is of type Floating point and can be referenced with the variable name MaxTimeMeasurement.

Max time in seconds that we can measure before rolling over and starting again.