mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:44:15 +00:00
some cleanup
This commit is contained in:
parent
c3e3c091cc
commit
a104c9881e
@ -721,12 +721,7 @@ namespace i2p
|
||||
|
||||
uint32_t RouterContext::GetUptime () const
|
||||
{
|
||||
#ifdef WIN32
|
||||
// for compatibility with WinXP
|
||||
return i2p::util::GetSecondsSinceEpoch () - m_StartupTime;
|
||||
#else
|
||||
return std::chrono::duration_cast<std::chrono::seconds> (std::chrono::steady_clock::now() - m_StartupTime).count ();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool RouterContext::Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx) const
|
||||
|
@ -136,12 +136,8 @@ namespace i2p
|
||||
i2p::data::PrivateKeys m_Keys;
|
||||
std::shared_ptr<i2p::crypto::CryptoKeyDecryptor> m_Decryptor;
|
||||
uint64_t m_LastUpdateTime; // in seconds
|
||||
bool m_AcceptsTunnels, m_IsFloodfill;
|
||||
#ifdef WIN32
|
||||
uint64_t m_StartupTime = 0; // in seconds since epoch
|
||||
#else
|
||||
bool m_AcceptsTunnels, m_IsFloodfill;
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_StartupTime;
|
||||
#endif
|
||||
uint64_t m_BandwidthLimit; // allowed bandwidth
|
||||
int m_ShareRatio;
|
||||
RouterStatus m_Status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user