Commit 6e4cd2ae authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding feature to start stopwatch directly on construction, often used this way in tests

parent 8af234d1
......@@ -45,7 +45,7 @@ class ITA_BASE_API ITAStopWatch
{
public:
//! Konstruktor
ITAStopWatch();
ITAStopWatch( bool bStartImmediately = false );
//! Konstruktor
ITAStopWatch( ITAClock* pClock );
......
......@@ -94,4 +94,4 @@ void ISO9613::AtmosphericAbsorption( ITABase::CThirdOctaveFactorMagnitudeSpectru
double dAirAbsorptionFactor = AtmosphericAbsorptionFactor( dFrequency, dDistance, dTemperature, dHumidity, dStaticPressure );
oA_atm_factor.SetMagnitude( i, ( float ) dAirAbsorptionFactor );
}
}
\ No newline at end of file
}
......@@ -10,7 +10,7 @@
bool ITAStopWatch::m_bInstanceCreated = false;
double ITAStopWatch::m_dStartStopLatency = 0;
ITAStopWatch::ITAStopWatch()
ITAStopWatch::ITAStopWatch( bool bStartImmediately /* = false */ )
: m_pClock( ITAClock::getDefaultClock() )
{
// Falls dies die erste Stopwatch ist die erzeugt wird: Latenz messen
......@@ -38,6 +38,9 @@ ITAStopWatch::ITAStopWatch()
}
reset();
if( bStartImmediately )
start();
}
ITAStopWatch::ITAStopWatch( ITAClock* pClock )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment