use Time_t

This commit is contained in:
Jeff Becker 2020-02-05 11:16:46 -05:00
parent 96c5553e34
commit 28561cd654
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ namespace llarp
, _dht(llarp_dht_context_new(this))
, inbound_link_msg_parser(this)
, _hiddenServiceContext(this)
, _randomStartDelay(1000 * (llarp::randint() % 30) + 10)
, _randomStartDelay(std::chrono::seconds((llarp::randint() % 30) + 10))
{
m_keyManager = std::make_shared< KeyManager >();
@ -117,7 +117,7 @@ namespace llarp
if(not IsServiceNode())
return;
/// wait for random uptime
if(Uptime() < _randomStartDelay)
if(Uptime() < _randomStartDelay.count())
return;
_rcGossiper.GossipRC(rc);
}

View File

@ -260,7 +260,7 @@ namespace llarp
bool enableRPCServer = false;
std::unique_ptr< rpc::Server > rpcServer;
std::string rpcBindAddr = DefaultRPCBindAddr;
const llarp_time_t _randomStartDelay;
const Time_t _randomStartDelay;
/// lokid caller
std::unique_ptr< rpc::Caller > rpcCaller;