mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Only on Windows do wait for input at the end of benchmark
Under MS Visual C++ debug window always unconditionally closes when program exits, this is bad because we want to read results before. So limit this kludge on Windows only. Original patch by Heinz van Saanen. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
190f88e532
commit
b1e79fed99
1 changed files with 11 additions and 2 deletions
|
@ -144,7 +144,16 @@ void benchmark(const string& commandLine) {
|
|||
break;
|
||||
totalNodes += nodes_searched();
|
||||
}
|
||||
cout << "\nProcessing time (ms) " << get_system_time() - startTime
|
||||
<< "\nNodes searched " << totalNodes << "\nPress any key to exit" << endl;
|
||||
cnt = get_system_time() - startTime;
|
||||
cout << "\nProcessing time (ms) " << cnt
|
||||
<< "\nNodes searched " << totalNodes
|
||||
<< "\nNodes/second " << (int)(totalNodes/(cnt/1000.0))
|
||||
<< endl;
|
||||
|
||||
// Under MS Visual C++ debug window always unconditionally closes
|
||||
// when program exits, this is bad because we want to read results before.
|
||||
#if (defined(WINDOWS) || defined(WIN32) || defined(WIN64))
|
||||
cout << "Press any key to exit" << endl;
|
||||
cin >> fileName;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue