#include <XrdThrottleManager.hh>
Definition at line 278 of file XrdThrottleManager.hh.
◆ ~XrdThrottleTimer()
| XrdThrottleTimer::~XrdThrottleTimer |
( |
| ) |
|
|
inline |
◆ XrdThrottleTimer() [1/2]
| XrdThrottleTimer::XrdThrottleTimer |
( |
| ) |
|
|
inlineprotected |
Definition at line 294 of file XrdThrottleManager.hh.
294 :
295 m_start_time(std::chrono::steady_clock::time_point::min())
296{}
◆ XrdThrottleTimer() [2/2]
Definition at line 298 of file XrdThrottleManager.hh.
298 :
299 m_owner(uid),
300 m_timer_list_entry(XrdThrottleManager::GetTimerListHash()),
301 m_manager(manager),
302 m_start_time(std::chrono::steady_clock::now())
303{
304 if (!m_manager) {
305 return;
306 }
307 auto &timerList = m_manager->m_timer_list[m_timer_list_entry];
308 std::lock_guard<std::mutex> lock(timerList.m_mutex);
309 if (timerList.m_first == nullptr) {
310 timerList.m_first = this;
311 } else {
312 m_prev = timerList.m_last;
313 m_prev->m_next = this;
314 }
315 timerList.m_last = this;
316}
References XrdThrottleManager.
◆ Reset()
| std::chrono::steady_clock::duration XrdThrottleTimer::Reset |
( |
| ) |
|
|
inlineprotected |
Definition at line 318 of file XrdThrottleManager.hh.
318 {
319 auto now = std::chrono::steady_clock::now();
320 auto last_start = m_start_time.exchange(now);
321 return now - last_start;
322}
◆ XrdThrottleManager
The documentation for this class was generated from the following file: