1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

fix compilation errors of different platforms and move to c++20

This commit is contained in:
birydrad 2024-09-12 16:37:25 +02:00
parent 0780a6a1b5
commit 1c66852842
10 changed files with 67 additions and 25 deletions

View file

@ -22,6 +22,10 @@
#include <ctime>
namespace td {
int64 Clocks::monotonic_nano() {
auto duration = std::chrono::steady_clock::now().time_since_epoch();
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
}
double Clocks::monotonic() {
// TODO write system specific functions, because std::chrono::steady_clock is steady only under Windows