SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
CTime Class Reference

Detailed Description

Class Time that implements a stopwatch based on either cpu time or wall clock time.

Definition at line 25 of file Time.h.

Inheritance diagram for CTime:
Inheritance graph
[legend]

Public Member Functions

 CTime (bool start=true)
virtual ~CTime ()
clock_t cur_runtime (bool verbose=false)
clock_t cur_runtime_diff (bool verbose=false)
float64_t cur_runtime_diff_sec (bool verbose=false)
float64_t start (bool verbose=false)
float64_t cur_time_diff (bool verbose=false)
float64_t time_diff_sec (bool verbose=false)
float64_t stop (bool verbose=false)
virtual const char * get_name () const
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Static Public Member Functions

static float64_t get_runtime ()
static float64_t get_curtime ()

Protected Attributes

clock_t start_runtime
float64_t start_time
float64_t stop_time

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

CTime ( bool  start = true)

constructor

Parameters
startif time measurement shall be started

Definition at line 17 of file Time.cpp.

~CTime ( )
virtual

Definition at line 28 of file Time.cpp.

Member Function Documentation

clock_t cur_runtime ( bool  verbose = false)

get current cpu runtime

Parameters
verboseif time shall be printed
Returns
current cpu runtime

Definition at line 32 of file Time.cpp.

clock_t cur_runtime_diff ( bool  verbose = false)

get time difference between start and NOW

Parameters
verboseif time difference shall be printed
Returns
time difference between start and NOW

Definition at line 40 of file Time.cpp.

float64_t cur_runtime_diff_sec ( bool  verbose = false)

get time difference between start and NOW in seconds (wall clock time)

Parameters
verboseif time difference shall be printed
Returns
time difference between start and NOW in seconds

Definition at line 48 of file Time.cpp.

float64_t cur_time_diff ( bool  verbose = false)

get time difference between start and NOW in seconds (wall clock time)

Parameters
verboseif time difference shall be printed
Returns
time difference between start and NOW in seconds

Definition at line 67 of file Time.cpp.

static float64_t get_curtime ( )
static

get current time in seconds

Returns
current time in seconds

Definition at line 99 of file Time.h.

virtual const char* get_name ( ) const
virtual
Returns
object name

Implements CSGObject.

Definition at line 109 of file Time.h.

static float64_t get_runtime ( )
static

get runtime

Returns
runtime

Definition at line 89 of file Time.h.

float64_t start ( bool  verbose = false)

start the counter

Parameters
verboseif start time shall be printed
Returns
start time in seconds

Definition at line 58 of file Time.cpp.

float64_t stop ( bool  verbose = false)

stop the counter

Parameters
verboseif stop time shall be printed
Returns
stop time in seconds

Definition at line 85 of file Time.cpp.

float64_t time_diff_sec ( bool  verbose = false)

get time difference between start and stop in seconds

Parameters
verboseif time difference shall be printed
Returns
time difference between start and stop in seconds

Definition at line 76 of file Time.cpp.

Member Data Documentation

clock_t start_runtime
protected

start runtime

Definition at line 113 of file Time.h.

float64_t start_time
protected

start time

Definition at line 116 of file Time.h.

float64_t stop_time
protected

stop time

Definition at line 118 of file Time.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation