Difference between revisions of "Component: Timer Free (Timing)"
From Flowcode Help
Jump to navigationJump to searchLine 84: | Line 84: | ||
{{Fcfile|TimerExample.fcfx|Timer Example}} | {{Fcfile|TimerExample.fcfx|Timer Example}} | ||
+ | |||
+ | |||
Line 89: | Line 91: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===GetCountSeconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 102: | Line 105: | ||
+ | ===StartCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 120: | Line 124: | ||
+ | ===GetCountString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 138: | Line 143: | ||
+ | ===GetCountMicroSeconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 151: | Line 157: | ||
+ | ===GetCountMilliseconds=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 164: | Line 171: | ||
+ | ===StopCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 177: | Line 185: | ||
+ | ===ResetCounter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 190: | Line 199: | ||
+ | ===GetCountReal=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 203: | Line 213: | ||
+ | ===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 Free 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_TimerComponentFree.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_TimerComponentFree.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example showing the operation of the timer component used to time a section of code or the duration of a specific event.
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 |
![]() |
Return |