MCPcopy Create free account
hub / github.com/ImageEngine/cortex / elapsedTime

Method elapsedTime

include/IECore/Canceller.h:116–126  ·  view source on GitHub ↗

Returns the time passed since `cancel()` was first called, or `0` if it has not been called yet.

Source from the content-addressed store, hash-verified

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

Callers 2

testElapsedTimeMethod · 0.95
elapsedTimeWrapperFunction · 0.80

Calls

no outgoing calls

Tested by 1

testElapsedTimeMethod · 0.76