Difference between revisions of "Component: Timer (Timing)"
From Flowcode Help
Jump to navigationJump to searchLine 48: | Line 48: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 53: | Line 55: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===GetCountSeconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 66: | Line 69: | ||
+ | ===StartCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 84: | Line 88: | ||
+ | ===GetCountString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 102: | Line 107: | ||
+ | ===GetCountMicroSeconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 115: | Line 121: | ||
+ | ===GetCountMilliseconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 128: | Line 135: | ||
+ | ===StopCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 141: | Line 149: | ||
+ | ===ResetCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 154: | Line 163: | ||
+ | ===GetCountReal=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 167: | Line 177: | ||
+ | ===GetRawCount=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:52, 3 February 2023
Author | Matrix TSL |
Version | 1.1 |
Category | Timing |
Contents
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, stop and reset the timer counter. Returns time as integer Seconds, Milliseconds, Microseconds and also Floating Point and String.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_TimerComponent.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TimerComponent.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetCountSeconds
![]() |
GetCountSeconds |
Returns the count value as a number of whole seconds, rounded down to the nearest second | |
![]() |
Return |
StartCounter
![]() |
StartCounter |
Starts the timer counting. | |
![]() |
ResetCounters |
Range: 0-1 where 0=Do Not Reset and 1=Reset | |
![]() |
Return |
GetCountString
![]() |
GetCountString |
Returns the count value as a floating point string in seconds. | |
![]() |
Precision |
Number of decimal places to display in string | |
![]() |
Return |
GetCountMicroSeconds
![]() |
GetCountMicroSeconds |
Returns the count value as a number of whole microseconds, rounded down to the nearest microsecond | |
![]() |
Return |
GetCountMilliseconds
![]() |
GetCountMilliseconds |
Returns the count value as a number of whole milliseconds, rounded down to the nearest millisecond | |
![]() |
Return |
StopCounter
![]() |
StopCounter |
Stops the timer counting. | |
![]() |
Return |
ResetCounter
![]() |
ResetCounter |
![]() |
Return |
GetCountReal
![]() |
GetCountReal |
Returns the count value as a floating point value in seconds. | |
![]() |
Return |
GetRawCount
![]() |
GetRawCount |
Efficient command to collect the integer number of instructions since the timer was started. | |
![]() |
Return |