12 #ifndef SST_CORE_CORE_PROFILE_H
13 #define SST_CORE_CORE_PROFILE_H
16 #include <sst/core/warnmacros.h>
24 #ifdef __SST_ENABLE_PROFILE__
26 #if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
27 #define CLOCK std::chrono::system_clock
29 #define CLOCK std::chrono::steady_clock
33 typedef CLOCK::time_point ProfData_t;
35 inline ProfData_t now()
40 inline double getElapsed(
const ProfData_t &begin,
const ProfData_t &end)
42 std::chrono::duration<double> elapsed = (end - begin);
43 return elapsed.count();
47 inline double getElapsed(
const ProfData_t &since)
49 return getElapsed(since, now());
54 typedef double ProfData_t;
56 inline ProfData_t now()
61 inline double getElapsed(
const ProfData_t &UNUSED(begin),
const ProfData_t &UNUSED(end))
67 inline double getElapsed(
const ProfData_t &UNUSED(since))