mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
renamed steady to monotonic
This commit is contained in:
parent
b86c83a068
commit
a8af683643
6 changed files with 24 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2024, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -232,12 +232,24 @@ namespace util
|
|||
return GetLocalHoursSinceEpoch () + g_TimeOffset/3600;
|
||||
}
|
||||
|
||||
uint64_t GetSteadyMicroseconds()
|
||||
uint64_t GetMonotonicMicroseconds()
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
std::chrono::steady_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
uint64_t GetMonotonicMilliseconds()
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::steady_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
uint64_t GetMonotonicSeconds ()
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::steady_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
void GetCurrentDate (char * date)
|
||||
{
|
||||
GetDateString (GetSecondsSinceEpoch (), date);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue