| 5 | |
| 6 | == Constructor == |
| 7 | |
| 8 | {{{ |
| 9 | CTimer(int nValue, bool bMilliseconds = false); |
| 10 | }}} |
| 11 | |
| 12 | ==== Parameters ==== |
| 13 | * nValue - Time value, if bMilliseconds is false value is seconds, otherwise value is milliseconds |
| 14 | * bMilliseconds - True to interpret nValue as milliseconds, false nValue is interpreted as seconds. |
| 15 | |
| 16 | ==== Example ==== |
| 17 | |
| 18 | {{{ |
| 19 | CTimer tmr(10); |
| 20 | |
| 21 | tmr.Start(); // Start 10 second count |
| 22 | |
| 23 | while(1) |
| 24 | { |
| 25 | // ... We can do some processing here |
| 26 | if(tmr.GetExpired()) |
| 27 | { |
| 28 | // 10 seconds is up |
| 29 | break; |
| 30 | } |
| 31 | } |
| 32 | }}} |
| 33 | |
| 34 | == Member Functions == |
| 35 | |
| 36 | === Set === |
| 37 | |
| 38 | {{{ |
| 39 | void Set(int nValue, bool bMilliseconds = false); |
| 40 | }}} |
| 41 | |
| 42 | ==== Parameters ==== |
| 43 | * nValue - Time value, if bMilliseconds is false value is seconds, otherwise value is milliseconds |
| 44 | * bMilliseconds - True to interpret nValue as milliseconds, false nValue is interpreted as seconds. |
| 45 | |
| 46 | ==== Return Value ==== |
| 47 | |
| 48 | Function does not return a value. |
| 49 | |
| 50 | ==== Remarks ==== |
| 51 | |
| 52 | ==== Example ==== |
| 53 | |
| 54 | {{{ |
| 55 | |
| 56 | }}} |
| 57 | |