stellar

Stellar - UCI Chess engine written in C++20
git clone git://git.dimitrijedobrota.com/stellar.git
Log | Files | Refs | README | LICENSE

timer.hpp (307B)


      1 #ifndef STELLAR_TIME_H
      2 #define STELLAR_TIME_H
      3 
      4 #include <chrono>
      5 
      6 namespace timer {
      7 
      8 inline uint32_t get_ms() {
      9     const auto duration = std::chrono::system_clock::now().time_since_epoch();
     10     return std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
     11 }
     12 
     13 } // namespace timer
     14 
     15 #endif