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. |
Get current time, and formatting functions.
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 | ( | ) |
Get time using the default mode.
Definition at line 78 of file SgTime.cpp.
Referenced by SgGtpCommands::CmdCpuTime(), SgGtpCommands::CmdCpuTimeReset(), SgTimer::GetTime(), SgTimer::IsTimeOut(), SgTimeRecord::SetClock(), SgTimer::Start(), SgTimer::Stop(), SgTimeRecord::TurnClockOn(), and SgTimeRecord::UpdateTimeLeft().
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.