Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

SgTime Namespace Reference

Get current time, and formatting functions. More...

Functions

std::string Format (double time, bool minsAndSecs=true)
 Format time as MM:SS.
double Get ()
 Get time using the default mode.
double Get (SgTimeMode mode)
 Get time using explicit mode.
SgTimeMode DefaultMode ()
 Return current default time mode.
void SetDefaultMode (SgTimeMode mode)
 Set default time mode.
std::string TodaysDate ()
 Get today's date in a format compatible with the DT property of the SGF standard.

Detailed Description

Get current time, and formatting functions.


Function Documentation

SgTimeMode SgTime::DefaultMode (  ) 

Return current default time mode.

Definition at line 135 of file SgTime.cpp.

Referenced by SgGtpCommands::CmdParam(), and SgUctSearch::StartSearch().

string SgTime::Format ( double  time,
bool  minsAndSecs = true 
)

Format time as MM:SS.

Definition at line 63 of file SgTime.cpp.

Referenced by operator<<(), and SgUctSearch::PrintSearchProgress().

double SgTime::Get (  ) 
double SgTime::Get ( SgTimeMode  mode  ) 

Get time using explicit mode.

Definition at line 83 of file SgTime.cpp.

References cerr, SG_ASSERT, SG_TIME_CPU, and SG_TIME_REAL.

void SgTime::SetDefaultMode ( SgTimeMode  mode  ) 

Set default time mode.

Definition at line 140 of file SgTime.cpp.

Referenced by SgGtpCommands::CmdParam().

string SgTime::TodaysDate (  ) 

Get today's date in a format compatible with the DT property of the SGF standard.

Definition at line 145 of file SgTime.cpp.


Sun Mar 13 2011 Doxygen 1.7.1