23 #ifndef __MLPACK_CORE_UTILITIES_TIMERS_HPP
24 #define __MLPACK_CORE_UTILITIES_TIMERS_HPP
29 #if defined(__unix__) || defined(__unix)
33 #elif defined(__MACH__) && defined(__APPLE__)
34 #include <mach/mach_time.h>
48 #if !defined(HAVE_UINT64_T)
49 #if SIZEOF_UNSIGNED_LONG == 8
50 typedef unsigned long uint64_t;
52 typedef unsigned long long uint64_t;
53 #endif // SIZEOF_UNSIGNED_LONG
54 #endif // HAVE_UINT64_T
57 #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
58 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
60 #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
61 #endif // _MSC_VER, _MSC_EXTENSIONS
86 static void Start(
const std::string& name);
95 static void Stop(
const std::string& name);
102 static timeval
Get(
const std::string& name);
121 timeval
GetTimer(
const std::string& timerName);
129 void PrintTimer(
const std::string& timerName);
139 void StartTimer(
const std::string& timerName);
147 void StopTimer(
const std::string& timerName);
158 #endif // __MLPACK_CORE_UTILITIES_TIMERS_HPP