From 10e468bfe8e22770cccb692ecb6232c610de2da4 Mon Sep 17 00:00:00 2001 From: MRXLT Date: Wed, 26 Feb 2020 17:04:04 +0800 Subject: [PATCH] fix profile timestamp --- core/util/src/timer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/util/src/timer.cc b/core/util/src/timer.cc index 836a1002..df9d4e91 100644 --- a/core/util/src/timer.cc +++ b/core/util/src/timer.cc @@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#include #include "core/util/include/timer.h" +#include namespace baidu { namespace paddle_serving { @@ -56,7 +56,7 @@ double Timer::ElapsedSec() { return _elapsed / 1000000.0; } int64_t Timer::TimeStampUS() { gettimeofday(&_now, NULL); - return _now.tv_usec; + return _now.tv_sec * 1000 * 1000L + _now.tv_usec; } int64_t Timer::Tickus() { -- GitLab