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:
parent
0780a6a1b5
commit
1c66852842
10 changed files with 67 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue