/*! @page q_stimers Timers
* @tableofcontents
*
* @section q_stimers_overview Overview
* The QuarkTS++ Timers are an essential extension as they allow for accurate and efficient 
* timekeeping without blocking tasks. Using Timers enables the embedded 
* application to perform other critical tasks while the timer is running in the
* background. Timers also provide flexibility in the event that the timer 
* needs to be paused, restarted, or adjusted on the fly. This can be 
* particularly useful in applications that require dynamic timing or have 
* unpredictable event intervals.
*
* The Non-blocking design of the Timer is particularly important in 
* cooperative scheduling because the tasks and operations of the OS are 
* dependent on the cooperation of other tasks. Blocking timers can be 
* problematic in a cooperative model because they halt the execution of the
* task, preventing other tasks from running. This can cause delays, missed 
* deadlines, and other performance issues.
* 
* The timer implementation does not access resources from the interrupt 
* context, does not consume any significant processing time unless a timer has 
* actually expired, does not add any processing overhead to the sys-tick 
* interrupt, and does not walk any other data structures. The timer service 
* just takes the value of the existing kernel clock source for reference 
* \f$ t_{sys}\f$ , allowing timer functionality to be added to an application 
* with minimal impact.
*
* <center>
* @htmlonly
* <!DOCTYPE html>
* <html>
* <head>
* <title>timers++</title>
* <meta charset="utf-8"/>
* </head>
* <body><div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quot;zoom&quot;:1.2,&quot;resize&quot;:true,&quot;toolbar&quot;:&quot;zoom layers tags lightbox&quot;,&quot;edit&quot;:&quot;_blank&quot;,&quot;xml&quot;:&quot;&lt;mxfile host=\&quot;app.diagrams.net\&quot; modified=\&quot;2023-04-21T05:22:48.231Z\&quot; agent=\&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36\&quot; etag=\&quot;Fdhz2bzOmpGiuD6lzx_b\&quot; version=\&quot;21.2.1\&quot; type=\&quot;google\&quot;&gt;\n  &lt;diagram name=\&quot;Página-1\&quot; id=\&quot;XHreDaHMVo4Np0G45lwU\&quot;&gt;\n    &lt;mxGraphModel dx=\&quot;1077\&quot; dy=\&quot;19\&quot; grid=\&quot;1\&quot; gridSize=\&quot;10\&quot; guides=\&quot;1\&quot; tooltips=\&quot;1\&quot; connect=\&quot;1\&quot; arrows=\&quot;1\&quot; fold=\&quot;1\&quot; page=\&quot;1\&quot; pageScale=\&quot;1\&quot; pageWidth=\&quot;1169\&quot; pageHeight=\&quot;827\&quot; math=\&quot;0\&quot; shadow=\&quot;0\&quot;&gt;\n      &lt;root&gt;\n        &lt;mxCell id=\&quot;0\&quot; /&gt;\n        &lt;mxCell id=\&quot;1\&quot; parent=\&quot;0\&quot; /&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-1\&quot; value=\&quot;elapsed E&amp;lt;sub style=&amp;quot;font-size: 13px;&amp;quot;&amp;gt;t&amp;lt;/sub&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1;fontFamily=Helvetica;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;358.50000000000006\&quot; y=\&quot;1125.34\&quot; width=\&quot;85.37\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-2\&quot; value=\&quot;( t&amp;lt;sub&amp;gt;sys&amp;amp;nbsp;&amp;lt;/sub&amp;gt;- Xt&amp;lt;sub&amp;gt;i&amp;amp;nbsp;&amp;lt;/sub&amp;gt;) ≥ X&amp;lt;sub&amp;gt;Tx&amp;lt;/sub&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;404.3\&quot; y=\&quot;1274.84\&quot; width=\&quot;147.5\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-3\&quot; value=\&quot;\&quot; style=\&quot;endArrow=classic;html=1;rounded=0;strokeColor=#007FFF;shadow=0;curved=1;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;281.4300000000001\&quot; y=\&quot;1205.7900000000002\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;657.3\&quot; y=\&quot;1206.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-4\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;282.3\&quot; y=\&quot;1204.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;282.3\&quot; y=\&quot;1189.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-5\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;318.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;318.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-6\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;357.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;357.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-7\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;397.3\&quot; y=\&quot;1204.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;397.3\&quot; y=\&quot;1189.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-8\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;437.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;437.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-9\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;477.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;477.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-10\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;517.3\&quot; y=\&quot;1204.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;517.3\&quot; y=\&quot;1189.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-11\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;557.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;557.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-12\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;597.3\&quot; y=\&quot;1205.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;597.3\&quot; y=\&quot;1190.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-13\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=1;shadow=0;fontSize=13;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;636.3\&quot; y=\&quot;1204.72\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;636.3\&quot; y=\&quot;1189.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-14\&quot; value=\&quot;&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;background-color: initial;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;...&amp;lt;/b&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;\&quot; style=\&quot;text;whiteSpace=wrap;html=1;fontSize=13;fontColor=#808080;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;347.3\&quot; y=\&quot;1199.72\&quot; width=\&quot;20\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-15\&quot; value=\&quot;\&quot; style=\&quot;shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;fillStyle=solid;fontSize=13;fontColor=#808080;strokeColor=#999999;strokeWidth=2;fillColor=#E6E6E6;rotation=90;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;387.58\&quot; y=\&quot;1080\&quot; width=\&quot;20\&quot; height=\&quot;156.8\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-16\&quot; value=\&quot;&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;background-color: initial;&amp;quot;&amp;gt;&amp;lt;b&amp;gt;t&amp;lt;/b&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;\&quot; style=\&quot;text;whiteSpace=wrap;html=1;fontSize=13;fontColor=#808080;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;473.68\&quot; y=\&quot;1200.72\&quot; width=\&quot;24.62\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-17\&quot; value=\&quot;\&quot; style=\&quot;endArrow=blockThin;html=1;rounded=0;strokeColor=#808080;shadow=0;curved=1;strokeWidth=2;startArrow=none;startFill=0;endFill=1;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;317.3\&quot; y=\&quot;1278.1000000000001\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;317.3\&quot; y=\&quot;1249.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-18\&quot; value=\&quot;\&quot; style=\&quot;endArrow=blockThin;html=1;rounded=0;strokeColor=#808080;shadow=0;curved=1;strokeWidth=2;startArrow=none;startFill=0;endFill=1;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;477.57\&quot; y=\&quot;1266.47\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;477.57\&quot; y=\&quot;1226.47\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-19\&quot; value=\&quot;X expiration\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;440.50000000000006\&quot; y=\&quot;1258.72\&quot; width=\&quot;85.37\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-20\&quot; value=\&quot;X.set(Et)&amp;amp;nbsp;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=10;fontColor=#808080;fontStyle=0;fontFamily=Lucida Console;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;256.00000000000006\&quot; y=\&quot;1084.2199999999998\&quot; width=\&quot;144.68\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-21\&quot; value=\&quot;\&quot; style=\&quot;endArrow=classic;html=1;rounded=0;strokeColor=#808080;shadow=0;curved=1;strokeWidth=2;dashed=1;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;476.6800000000001\&quot; y=\&quot;1179.4700000000005\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;590.3\&quot; y=\&quot;1179.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-22\&quot; value=\&quot;\&quot; style=\&quot;endArrow=blockThin;html=1;rounded=0;strokeColor=#808080;shadow=0;curved=1;strokeWidth=2;startArrow=none;startFill=0;endFill=1;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;318.63000000000005\&quot; y=\&quot;1109.2199999999998\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;318.63000000000005\&quot; y=\&quot;1150.2199999999998\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-23\&quot; value=\&quot;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#808080;strokeColor=#808080;strokeWidth=2;labelBackgroundColor=#808080;fillStyle=solid;fillColor=#808080;rotation=-90;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;411.68\&quot; y=\&quot;1158.6499999999999\&quot; width=\&quot;10\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-24\&quot; value=\&quot;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#808080;strokeColor=#007FFF;strokeWidth=2;labelBackgroundColor=#3399FF;fillStyle=solid;fillColor=#007FFF;rotation=-90;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;452.3\&quot; y=\&quot;1158.6499999999999\&quot; width=\&quot;10\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-25\&quot; value=\&quot;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#808080;strokeColor=#B3B3B3;strokeWidth=2;labelBackgroundColor=#808080;fillStyle=solid;fillColor=#B3B3B3;rotation=-90;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;333.99000000000007\&quot; y=\&quot;1158.4799999999998\&quot; width=\&quot;10\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-26\&quot; value=\&quot;\&quot; style=\&quot;rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#808080;strokeColor=#999999;strokeWidth=2;labelBackgroundColor=#808080;fillStyle=solid;fillColor=#999999;rotation=-90;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;370.3\&quot; y=\&quot;1158.4799999999998\&quot; width=\&quot;10\&quot; height=\&quot;40\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-27\&quot; value=\&quot;T&amp;lt;sub&amp;gt;X&amp;lt;/sub&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10.8333px;&amp;quot;&amp;gt;=E&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt;&amp;lt;/span&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1;fontFamily=Helvetica;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;293.50000000000006\&quot; y=\&quot;1274.84\&quot; width=\&quot;85.37\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-28\&quot; value=\&quot;\&quot; style=\&quot;endArrow=none;html=1;rounded=0;strokeColor=#808080;shadow=0;curved=1;strokeWidth=1;startArrow=none;startFill=0;endFill=0;\&quot; edge=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry width=\&quot;50\&quot; height=\&quot;50\&quot; relative=\&quot;1\&quot; as=\&quot;geometry\&quot;&gt;\n            &lt;mxPoint x=\&quot;316.5599999999999\&quot; y=\&quot;1284.22\&quot; as=\&quot;sourcePoint\&quot; /&gt;\n            &lt;mxPoint x=\&quot;316.3\&quot; y=\&quot;1309.1000000000001\&quot; as=\&quot;targetPoint\&quot; /&gt;\n          &lt;/mxGeometry&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-29\&quot; value=\&quot;X\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1;fontFamily=Helvetica;\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;297.3\&quot; y=\&quot;1279.97\&quot; width=\&quot;23\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-30\&quot; value=\&quot;t&amp;lt;sub&amp;gt;sys&amp;amp;nbsp;&amp;lt;/sub&amp;gt;(tick)\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;568.6800000000001\&quot; y=\&quot;1206.8\&quot; width=\&quot;147.5\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-31\&quot; value=\&quot;t&amp;lt;sub&amp;gt;0&amp;lt;br&amp;gt;armed&amp;lt;br&amp;gt;&amp;lt;/sub&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;301.8\&quot; y=\&quot;1210.72\&quot; width=\&quot;37.5\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-32\&quot; value=\&quot;t&amp;lt;sub&amp;gt;-1&amp;amp;nbsp;&amp;lt;/sub&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;422.93\&quot; y=\&quot;1200.72\&quot; width=\&quot;39.5\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n        &lt;mxCell id=\&quot;vyZwSIN-qtXGtuRVDQ8B-33\&quot; value=\&quot;t&amp;lt;sub&amp;gt;-2&amp;lt;/sub&amp;gt;\&quot; style=\&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillStyle=solid;fontSize=13;fontColor=#808080;fontStyle=1\&quot; vertex=\&quot;1\&quot; parent=\&quot;1\&quot;&gt;\n          &lt;mxGeometry x=\&quot;381.43\&quot; y=\&quot;1201.47\&quot; width=\&quot;39.5\&quot; height=\&quot;30\&quot; as=\&quot;geometry\&quot; /&gt;\n        &lt;/mxCell&gt;\n      &lt;/root&gt;\n    &lt;/mxGraphModel&gt;\n  &lt;/diagram&gt;\n&lt;/mxfile&gt;\n&quot;}"></div>
* <script type="text/javascript" src="https://viewer.diagrams.net/js/viewer-static.min.js"></script>
* </body>
* </html>
* @endhtmlonly
* <em>Timers operation</em>
* </center>
*
* As illustrated in the figure, the time expiration check is roll-over safe 
* by restricting it, to the only calculation that makes sense for timestamps, 
* \f$ t_{sys} − X_{T_x} \f$, that yields a duration namely the amount of time 
* elapsed between the current instant \f$ t_{sys}\f$ and the later instant, 
* specifically, the tick taken at the arming instant with qOS::timer::set(), 
* \f$ X_{t_i}\f$
* Thanks to modular arithmetic, both of these are guaranteed to work fine across 
* the clock-source rollover (a 32bit unsigned-counter), at least, as long the 
* delays involved are shorter than @c 49.7 days.
*
* <b> Features </b>
*
* - Provides a non-blocking equivalent to delay function.
* - Each Timer encapsulates its own expiration (timeout) time.
* - Provides elapsed and remaining time methods.
* - As mentioned before, QuarkTS++ timers uses the same kernel clock source, this means 
* the time-elapsed calculation uses the qOS::clock::getTick() method, therefore, the time
* resolution has the same value passed when the scheduler has been initialized
* with qOS::core::init()
*
* @section q_stimerusage Using a Timer
* To use timers, the code should follow a specific pattern that deals with the 
* states of this object ( qOS::timer ). All related methods are designed to be non-blocking, this
* means there are ideal for use in cooperative environments such as the one provided 
* by the OS itself. To minimize the implementation, this object is intentionally
* created to behave like a binary object, this implies that it only handles two 
* states, @a Armed and @a Disarmed.
* An @a Armed timer means that it is already running with a specified preset 
* value and a @a Disarmed timer is the opposite, which means that it does not 
* have a preset value, so consequently, it is not running at all.
*
* The arming action can be performed with qOS::timer::set() or qOS::timer::freeRun() and
* disarming with qOS::timer::disarm().
* For qOS::timer::freeRun(), it checks the timer and performs the arming. If
* disarmed, it gets armed immediately with the specified time. If armed, the 
* time argument is ignored and the method only checks for expiration. When the time
* expires, the Timer gets armed immediately taking the specified time.
*
* All possible checking actions are also provided for this object, including 
* qOS::timer::elapsed(), qOS::timer::remaining() and qOS::timer::expired() , with the last 
* one being the most commonly used for timing applications. Finally, to get the 
* current status of the Timer (check if is @a Armed or @a Disarmed) the 
* qOS::timer::status() method should be used.
*
* @section q_stimerexample Timer example
* The example below shows a simple usage of this object. It is noteworthy that
* arming is performed once using the qOS::event_t::firstCall() flag. This prevents the timer
* from being re-armed every time the task runs. After the timer expires, it
* should be disarmed explicitly
*
*  @code{.c}
*  void Example_Task( event_t e ) {
*      static timer timeout;
*      if ( e.firstCall() ) {
*          /*Arming the stimer for  3.5 seg*/
*          timeout.set( 3.5_sec );
*      }
*      
*      /*non-blocking delay, true when timeout expires*/
*      if ( timeout.expired() ) {
*          /* TODO: Code when Timer expires */
*          timeout.disarm();
*      }
*      else return; /*Yield*/
*  }
*  @endcode
*
*/