コード例 #1
0
ファイル: InboundLedgers.cpp プロジェクト: xdv/divvyd
 std::size_t fetchRate()
 {
     std::lock_guard<
         std::mutex> lock(fetchRateMutex_);
     return 60 * fetchRate_.value(
         m_clock.now());
 }
コード例 #2
0
ファイル: InboundLedgers.cpp プロジェクト: xdv/divvyd
 void onLedgerFetched (
     InboundLedger::fcReason why)
 {
     if (why != InboundLedger::fcHISTORY)
         return;
     std::lock_guard<
         std::mutex> lock(fetchRateMutex_);
     fetchRate_.add(1, m_clock.now());
 }
コード例 #3
0
ファイル: InboundLedgers.cpp プロジェクト: Empresaria/rippled
 // Should only be called with an inboundledger that has
 // a reason of history or shard
 void onLedgerFetched() override
 {
     std::lock_guard<std::mutex> lock(fetchRateMutex_);
     fetchRate_.add(1, m_clock.now());
 }