|
5 | 5 | /**********************************************************************************************************************************************/ |
6 | 6 | //Default Constructor |
7 | 7 | clsTick::clsTick() { |
| 8 | + ///////////////////////////////////////////////// |
| 9 | + /// @brief Default constructor, just sets lngTimerStart to now |
| 10 | + ///////////////////////////////////////////////// |
| 11 | + |
8 | 12 | lngTimerStart = clock(); |
9 | 13 | } |
10 | 14 | /**********************************************************************************************************************************************/ |
11 | 15 | void clsTick::startTimer() { |
| 16 | + ///////////////////////////////////////////////// |
| 17 | + /// @brief Sets lngTimerStart to now. |
| 18 | + ///////////////////////////////////////////////// |
| 19 | + |
12 | 20 | lngTimerStart = clock(); |
13 | 21 | } |
14 | 22 | /**********************************************************************************************************************************************/ |
15 | 23 | double clsTick::getTimeDifference() { |
| 24 | + ///////////////////////////////////////////////// |
| 25 | + /// @brief Returns the difference (in seconds) from now to when lngTimerStart |
| 26 | + /// @return Time in Seconds |
| 27 | + ///////////////////////////////////////////////// |
| 28 | + |
16 | 29 | double temp_time = (double)(((double)clock() - (double)lngTimerStart) / (double)CLOCKS_PER_SEC); |
17 | 30 | startTimer(); |
18 | 31 | return temp_time; |
19 | 32 | } |
20 | 33 | /**********************************************************************************************************************************************/ |
21 | 34 | void clsTick::startHolding() { |
| 35 | + ///////////////////////////////////////////////// |
| 36 | + /// @brief Sets lngTimerStart to now. |
| 37 | + ///////////////////////////////////////////////// |
22 | 38 | lngHoldingStart = clock(); |
23 | 39 | } |
24 | 40 | /**********************************************************************************************************************************************/ |
25 | 41 | double clsTick::stopHolding() { |
| 42 | + ///////////////////////////////////////////////// |
| 43 | + /// @brief Returns the difference (in seconds) from now to when lngHoldingStart |
| 44 | + /// @return Time in Seconds |
| 45 | + ///////////////////////////////////////////////// |
| 46 | + |
26 | 47 | return (double)(((double)clock() - (double)lngHoldingStart) / (double)CLOCKS_PER_SEC); |
27 | 48 | } |
28 | 49 | /**********************************************************************************************************************************************/ |
0 commit comments