int mps, tc, inc, sTime, depth, myTime, hisTime, stm, computer = NONE, memory, oldMem=0, cores, moveNr, lastDepth, lastScore, startTime, debug;\r
int statDepth, statScore, statNodes, statTime, currNr, size, collect, nr, sm, inex, on[500];\r
char currMove[20], moveMap[500][10], /* for analyze mode */ canPonder[20], threadOpt[20];\r
+int unit = 1;\r
\r
FILE *toE, *fromE, *fromF;\r
int pid;\r
int sec = 0;\r
sscanf(line, "level %d %d:%d %d", &mps, &tc, &sec, &inc) == 4 ||\r
sscanf(line, "level %d %d %d", &mps, &tc, &inc);\r
- tc = (60*tc + sec)*1000; inc *= 1000; sTime = 0;\r
+ tc = (60*tc + sec)*1000; inc *= 1000; sTime = 0; tc /= unit; inc /= unit;\r
}\r
else if(!strcmp(command, "option")) {\r
char name[80], *p;\r
else if(!strcmp(command, "exit")) computer = NONE, StopPonder(1);\r
else if(!strcmp(command, "force")) computer = NONE, StopPonder(pondering);\r
else if(!strcmp(command, "go")) computer = stm;\r
- else if(!strcmp(command, "time")) sscanf(line+4, "%d", &myTime), myTime *= 10;\r
- else if(!strcmp(command, "otim")) sscanf(line+4, "%d", &hisTime), hisTime *= 10;\r
+ else if(!strcmp(command, "time")) sscanf(line+4, "%d", &myTime), myTime = (10*myTime)/unit;\r
+ else if(!strcmp(command, "otim")) sscanf(line+4, "%d", &hisTime), hisTime = (10*hisTime)/unit;\r
else if(!strcmp(command, "post")) post = 1;\r
else if(!strcmp(command, "nopost")) post = 0;\r
else if(!strcmp(command, "easy") && !!*canPonder) ponder = 0, StopPonder(pondering), fprintf(toE, "setoption name %s value false\n", canPonder);\r
else if(!strcmp(command, "memory")) sscanf(line, "memory %d", &memory);\r
else if(!strcmp(command, "cores")&& !!*threadOpt) sscanf(line, "cores %d", &cores), fprintf(toE, "setoption name %s value %d\n", threadOpt, cores);\r
else if(!strcmp(command, "sd")) sscanf(line, "sd %d", &depth);\r
- else if(!strcmp(command, "st")) sscanf(line, "st %d", &sTime), sTime = 1000*sTime - 30, inc = 0;\r
+ else if(!strcmp(command, "st")) sscanf(line, "st %d", &sTime), sTime = 1000*sTime - 30, inc = 0, sTime /= unit;\r
else if(!strcmp(command, "quit")) fprintf(toE, "quit\n"), fflush(toE), exit(0);\r
}\r
}\r