Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:47

0001 #include "HeterogeneousCore/SonicCore/interface/sonic_utils.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 
0004 #include <string_view>
0005 #include <chrono>
0006 
0007 namespace sonic_utils {
0008   void printDebugTime(std::string_view debugName, std::string_view msg, const TimePoint& t0) {
0009     auto t1 = std::chrono::high_resolution_clock::now();
0010     if (debugName.empty())
0011       return;
0012     edm::LogInfo(debugName) << msg << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count();
0013   }
0014 }  // namespace sonic_utils