19 #include <shogun/lib/config.h> 24 #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__) 27 #ifndef _TIMEVAL_DEFINED 28 #define _TIMEVAL_DEFINED 36 int gettimeofday(
struct timeval* tp,
void* tzp);
49 CTime(
bool start=
true);
57 clock_t cur_runtime(
bool verbose=
false);
64 clock_t cur_runtime_diff(
bool verbose=
false);
72 float64_t cur_runtime_diff_sec(
bool verbose=
false);
87 float64_t cur_time_diff(
bool verbose=
false);
94 float64_t time_diff_sec(
bool verbose=
false);
108 clock_t start_runtime = clock();
109 return ((
float64_t) start_runtime)/CLOCKS_PER_SEC;
119 if (gettimeofday(&tv, NULL)==0)
120 return tv.tv_sec+(tv.tv_usec*1e-6);
126 virtual const char*
get_name()
const {
return "Time"; }
Class Time that implements a stopwatch based on either cpu time or wall clock time.
static float64_t get_runtime()
virtual const char * get_name() const
static float64_t get_curtime()
Class SGObject is the base class of all shogun objects.
all of classes and functions are contained in the shogun namespace