MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / start

Method start

src/jrd/extds/ExtDS.cpp:1486–1512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1484}
1485
1486void ConnectionsPool::IdleTimer::start()
1487{
1488 FbLocalStatus s;
1489 ITimerControl* timerCtrl = Firebird::TimerInterfacePtr();
1490
1491 const time_t expTime = m_connPool.getIdleExpireTime();
1492 if (expTime == 0)
1493 return;
1494
1495 MutexLockGuard guard(m_mutex, FB_FUNCTION);
1496
1497 if (m_time && m_time <= expTime)
1498 return;
1499
1500 if (m_time)
1501 timerCtrl->stop(&s, this);
1502
1503 time_t t;
1504 time(&t);
1505 time_t delta = expTime - t;
1506
1507 if (delta <= 0)
1508 delta = 1;
1509
1510 m_time = expTime;
1511 timerCtrl->start(&s, this, delta * 1000 * 1000);
1512}
1513
1514void ConnectionsPool::IdleTimer::stop()
1515{

Callers 3

putConnectionMethod · 0.45
setLifeTimeMethod · 0.45
getTransactionMethod · 0.45

Calls 7

TimerInterfacePtrClass · 0.85
getIdleExpireTimeMethod · 0.80
stopMethod · 0.45
getStateMethod · 0.45
raiseMethod · 0.45
getTransactionMethod · 0.45
getInterfaceMethod · 0.45

Tested by

no test coverage detected