LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
timeUtilsController.cpp
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/************************************************************************
7 *
8 * @file timeUtilsController.cpp
9 * @author Besancon Romaric (besanconr@zoe.cea.fr)
10 * @date Fri Mar 5 2004
11 * @version $Id: timeUtilsController.cpp,v 1.3 2005/10/20 11:37:31 gael Exp $
12 * copyright Copyright (C) 2004-2012 by CEA LIST
13 *
14 ***********************************************************************/
15
16#include "timeUtilsController.h"
17#include "traceUtils.h"
18
19namespace Lima {
20
21TimeUtilsController::TimeUtilsController(const std::string& topic, bool logElapsedTime)
22 : m_topic(topic), m_logElapsedTime(logElapsedTime)
23{
25}
26
28 uint64_t delta = TimeUtils::elapsedTime(m_topic);
29 if (m_logElapsedTime) {
31 LINFO << m_topic << " ( ): " << delta << " ms";
32 }
33}
34
35
36} // end namespace
#define LINFO
Definition LimaCommon.h:158
TimeUtilsController(const std::string &topic, bool logElapsedTime=false)
static void updateCurrentTime(const std::string &taskCategory=std::string(""))
store current time for new elapsed time computation
static uint64_t elapsedTime(const std::string &taskCategory=std::string(""))
NAUTITIA.
#define TIMELOGINIT
Definition traceUtils.h:32