mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Get rid of struct Time
We just need the milliseconds of current system time for our needs. This allows to simplify the API. No functional change.
This commit is contained in:
13
src/misc.h
13
src/misc.h
@@ -44,15 +44,10 @@ struct Log : public std::ofstream {
|
||||
};
|
||||
|
||||
|
||||
struct Time {
|
||||
int64_t msec() const { return time_to_msec(t); }
|
||||
int elapsed() const { return int(now().msec() - msec()); }
|
||||
|
||||
static Time now() { Time t; system_time(&t.t); return t; }
|
||||
|
||||
private:
|
||||
sys_time_t t;
|
||||
};
|
||||
namespace Time {
|
||||
typedef int64_t point;
|
||||
point now();
|
||||
}
|
||||
|
||||
|
||||
template<class Entry, int Size>
|
||||
|
||||
Reference in New Issue
Block a user