Follow C++11 naming conventions.
No functional change.
int64_t nodes = 0;
Search::StateStackPtr st;
int64_t nodes = 0;
Search::StateStackPtr st;
- Time time = Time::current_time();
+ Time time = Time::now();
for (size_t i = 0; i < fens.size(); i++)
{
for (size_t i = 0; i < fens.size(); i++)
{
- for (int i = Time::current_time().msec() % 10000; i > 0; i--)
+ for (int i = Time::now().msec() % 10000; i > 0; i--)
RKiss.rand<unsigned>(); // Make random number generation less deterministic
}
RKiss.rand<unsigned>(); // Make random number generation less deterministic
}
int tm = msec;
#else
timespec ts, *tm = &ts;
int tm = msec;
#else
timespec ts, *tm = &ts;
- uint64_t ms = Time::current_time().msec() + msec;
+ uint64_t ms = Time::now().msec() + msec;
ts.tv_sec = ms / 1000;
ts.tv_nsec = (ms % 1000) * 1000000LL;
ts.tv_sec = ms / 1000;
ts.tv_nsec = (ms % 1000) * 1000000LL;
struct Time {
int64_t msec() const { return time_to_msec(t); }
struct Time {
int64_t msec() const { return time_to_msec(t); }
- int elapsed() const { return int(current_time().msec() - msec()); }
+ int elapsed() const { return int(now().msec() - msec()); }
- static Time current_time() { Time t; system_time(&t.t); return t; }
+ static Time now() { Time t; system_time(&t.t); return t; }
static RKISS rk;
// PRNG sequence should be not deterministic
static RKISS rk;
// PRNG sequence should be not deterministic
- for (int i = Time::current_time().msec() % 50; i > 0; i--)
+ for (int i = Time::now().msec() % 50; i > 0; i--)
rk.rand<unsigned>();
// RootMoves are already sorted by score in descending order
rk.rand<unsigned>();
// RootMoves are already sorted by score in descending order
- static Time lastInfoTime = Time::current_time();
+ static Time lastInfoTime = Time::now();
if (lastInfoTime.elapsed() >= 1000)
{
if (lastInfoTime.elapsed() >= 1000)
{
- lastInfoTime = Time::current_time();
+ lastInfoTime = Time::now();
const std::vector<Move>& searchMoves, StateStackPtr& states) {
wait_for_search_finished();
const std::vector<Move>& searchMoves, StateStackPtr& states) {
wait_for_search_finished();
- SearchTime = Time::current_time(); // As early as possible
+ SearchTime = Time::now(); // As early as possible
Signals.stopOnPonderhit = Signals.firstRootMove = false;
Signals.stop = Signals.failedLowAtRoot = false;
Signals.stopOnPonderhit = Signals.firstRootMove = false;
Signals.stop = Signals.failedLowAtRoot = false;