diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-18 14:09:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 07:58:15 +0200 |
commit | e61e4e56994c22221dcc0e9f4c2cb62fd63ac823 (patch) | |
tree | d38359c4e9a3de7112075244d7013907ce135d4f /sal | |
parent | ba80f637b82ef5df7c650ec301ca9ebb5f678f44 (diff) |
clang-tidy readability-misleading-indentation
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79
Reviewed-on: https://gerrit.libreoffice.org/61935
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 4f1df88b337f..770b82691286 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -105,7 +105,6 @@ void StopWatch::stop() // pre: Timer should be started // post: Timer will stopped - // gettimeofday(&t2, 0); // Ask timer osl_getSystemTime( &t2 ); t_print("# %u %u nsecs\n", static_cast<unsigned>(t2.Seconds), static_cast<unsigned>(t2.Nanosec)); @@ -113,18 +112,13 @@ void StopWatch::stop() { // check if started. m_nSeconds = static_cast<sal_Int32>(t2.Seconds) - static_cast<sal_Int32>(t1.Seconds); if ( t2.Nanosec > t1.Nanosec ) - m_nNanoSec = static_cast<sal_Int32>(t2.Nanosec) - static_cast<sal_Int32>(t1.Nanosec); - else - { - m_nNanoSec = 1000000000 + static_cast<sal_Int32>(t2.Nanosec) - static_cast<sal_Int32>(t1.Nanosec); - m_nSeconds -= 1; - } - t_print("# %u %u nsecs\n", static_cast<unsigned>(m_nSeconds), static_cast<unsigned>(m_nNanoSec) ); - //if (m_nNanoSec < 0) - //{ - //m_nNanoSec += 1000000000; - //m_nSeconds -= 1; - //} + m_nNanoSec = static_cast<sal_Int32>(t2.Nanosec) - static_cast<sal_Int32>(t1.Nanosec); + else + { + m_nNanoSec = 1000000000 + static_cast<sal_Int32>(t2.Nanosec) - static_cast<sal_Int32>(t1.Nanosec); + m_nSeconds -= 1; + } + t_print("# %u %u nsecs\n", static_cast<unsigned>(m_nSeconds), static_cast<unsigned>(m_nNanoSec) ); m_bIsValid = true; m_bIsRunning = false; } |