Fix time unit of CECP st command
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 7 Mar 2020 12:09:24 +0000 (13:09 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 7 Mar 2020 12:09:24 +0000 (13:09 +0100)
Set `st` in seconds instead of milliseconds.

Closes #85.

src/xboard.cpp

index 80bd7df..956211c 100644 (file)
@@ -164,9 +164,12 @@ void StateMachine::process_command(Position& pos, std::string token, std::istrin
           limits.inc[BLACK] = num * 1000;
       }
       else if (token == "sd")
-      is >> limits.depth;
+          is >> limits.depth;
       else if (token == "st")
-      is >> limits.movetime;
+      {
+          is >> num;
+          limits.movetime = num * 1000;
+      }
       // Note: time/otim are in centi-, not milliseconds
       else if (token == "time")
       {