mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Don't assume the type of Time::point
But instead use the proper definition. Also rewrite chrono functions while there. No functional change.
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
@@ -27,7 +26,6 @@
|
||||
#include "thread.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace std::chrono;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -125,13 +123,6 @@ const string engine_info(bool to_uci) {
|
||||
}
|
||||
|
||||
|
||||
/// Convert system time to milliseconds. That's all we need.
|
||||
|
||||
Time::point Time::now() {
|
||||
return duration_cast<milliseconds>(steady_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
|
||||
/// Debug functions used mainly to collect run-time statistics
|
||||
|
||||
void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
|
||||
|
||||
Reference in New Issue
Block a user