Returns the time passed since `cancel()` was first called, or `0` if it has not been called yet.
| 114 | /// Returns the time passed since `cancel()` was first called, or `0` if |
| 115 | /// it has not been called yet. |
| 116 | std::chrono::steady_clock::duration elapsedTime() const |
| 117 | { |
| 118 | if( m_cancelled ) |
| 119 | { |
| 120 | return std::chrono::steady_clock::now() - std::chrono::steady_clock::time_point( std::chrono::steady_clock::duration( m_cancellationTime ) ); |
| 121 | } |
| 122 | else |
| 123 | { |
| 124 | return std::chrono::steady_clock::duration( 0 ); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | private : |
| 129 |
no outgoing calls