| 102 | } |
| 103 | |
| 104 | int64_t FacebookBase::getCounter(const std::string& key) { |
| 105 | int64_t rv = 0; |
| 106 | counters_.lock(); |
| 107 | ReadWriteCounterMap::iterator it = counters_.find(key); |
| 108 | if (it != counters_.end()) { |
| 109 | it->second.lock(); |
| 110 | rv = it->second.value; |
| 111 | it->second.unlock(); |
| 112 | } |
| 113 | counters_.unlock(); |
| 114 | return rv; |
| 115 | } |
| 116 | |
| 117 | inline int64_t FacebookBase::aliveSince() { |
| 118 | return aliveSince_; |
no test coverage detected