blocxx
|
A timeout can be absolute, which means that it will happen at the specified DateTime. More...
#include <Timeout.hpp>
Public Types | |
enum | ETimeoutType { E_ABSOLUTE , E_RELATIVE , E_RELATIVE_WITH_RESET } |
Public Member Functions | |
ETimeoutType | getType () const |
DateTime | getAbsolute () const |
float | getRelative () const |
Static Public Member Functions | |
static Timeout | absolute (const DateTime &dt) |
static Timeout | relative (float seconds) |
static Timeout | relativeWithReset (float seconds) |
Static Public Attributes | |
static Timeout | infinite = relative( std::numeric_limits<float>::infinity() ) |
Private Member Functions | |
Timeout () | |
Timeout (ETimeoutType type, const DateTime &dt) | |
Timeout (ETimeoutType type, float seconds) | |
Private Attributes | |
ETimeoutType | m_type |
DateTime | m_absolute |
float | m_seconds |
A timeout can be absolute, which means that it will happen at the specified DateTime.
A timeout can be relative, which means that it will happen at the specified interval after the call is made. A timeout can be relative with reset, which means that it will happen at the specified interval after "no activity" has occurred. "no activity" is dependent on the operation. A timeout can be infinite.
Definition at line 55 of file Timeout.hpp.
Enumerator | |
---|---|
E_ABSOLUTE | |
E_RELATIVE | |
E_RELATIVE_WITH_RESET |
Definition at line 64 of file Timeout.hpp.
|
private |
Definition at line 93 of file Timeout.cpp.
Referenced by absolute(), relative(), and relativeWithReset().
|
private |
Definition at line 97 of file Timeout.cpp.
References m_absolute, and m_type.
|
private |
Definition at line 103 of file Timeout.cpp.
Definition at line 50 of file Timeout.cpp.
References E_ABSOLUTE, and Timeout().
Referenced by BLOCXX_NAMESPACE::TimeoutTimer::asAbsoluteTimeout().
DateTime BLOCXX_NAMESPACE::Timeout::getAbsolute | ( | ) | const |
Definition at line 82 of file Timeout.cpp.
References m_absolute.
Referenced by BLOCXX_NAMESPACE::operator==().
float BLOCXX_NAMESPACE::Timeout::getRelative | ( | ) | const |
Definition at line 88 of file Timeout.cpp.
References m_seconds.
Referenced by BLOCXX_NAMESPACE::operator==(), and BLOCXX_NAMESPACE::Process::waitCloseTerm().
Timeout::ETimeoutType BLOCXX_NAMESPACE::Timeout::getType | ( | ) | const |
Definition at line 76 of file Timeout.cpp.
References m_type.
Referenced by BLOCXX_NAMESPACE::operator==(), and BLOCXX_NAMESPACE::Process::waitCloseTerm().
|
static |
Definition at line 58 of file Timeout.cpp.
References E_RELATIVE, and Timeout().
Referenced by BLOCXX_NAMESPACE::ServerSocket::accept(), BLOCXX_NAMESPACE::TimeoutTimer::asRelativeTimeout(), BLOCXX_NAMESPACE::TimeoutTimer::asRelativeTimeout(), BLOCXX_NAMESPACE::Thread::definitiveCancel(), BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput(), BLOCXX_NAMESPACE::RWLocker::getReadLock(), BLOCXX_NAMESPACE::RWLocker::getWriteLock(), BLOCXX_NAMESPACE::ThreadCounter::incThreadCount(), BLOCXX_NAMESPACE::ReadLock::lock(), BLOCXX_NAMESPACE::WriteLock::lock(), BLOCXX_NAMESPACE::PosixUnnamedPipe::PosixUnnamedPipe(), BLOCXX_NAMESPACE::PosixUnnamedPipe::PosixUnnamedPipe(), BLOCXX_NAMESPACE::ReadLock::ReadLock(), BLOCXX_NAMESPACE::Select::select(), BLOCXX_NAMESPACE::Select::selectRW(), BLOCXX_NAMESPACE::Socket::setConnectTimeout(), BLOCXX_NAMESPACE::UnnamedPipe::setReadTimeout(), BLOCXX_NAMESPACE::Socket::setReceiveTimeout(), BLOCXX_NAMESPACE::Socket::setSendTimeout(), BLOCXX_NAMESPACE::Socket::setTimeouts(), BLOCXX_NAMESPACE::UnnamedPipe::setTimeouts(), BLOCXX_NAMESPACE::UnnamedPipe::setWriteTimeout(), BLOCXX_NAMESPACE::ThreadPool::shutdown(), BLOCXX_NAMESPACE::ThreadImpl::sleep(), BLOCXX_NAMESPACE::PosixExec::spawnImpl(), BLOCXX_NAMESPACE::Exec::system(), BLOCXX_NAMESPACE::Condition::timedWait(), BLOCXX_NAMESPACE::Semaphore::timedWait(), BLOCXX_NAMESPACE::ThreadPool::tryAddWork(), BLOCXX_NAMESPACE::Process::waitCloseTerm(), BLOCXX_NAMESPACE::Process::waitCloseTerm(), BLOCXX_NAMESPACE::ThreadCounter::waitForAll(), BLOCXX_NAMESPACE::Socket::waitForInput(), BLOCXX_NAMESPACE::SocketUtils::waitForIO(), BLOCXX_NAMESPACE::Socket::waitForOutput(), BLOCXX_NAMESPACE::WriteLock::WriteLock(), and BLOCXX_NAMESPACE::Process::~Process().
|
static |
Definition at line 66 of file Timeout.cpp.
References E_RELATIVE_WITH_RESET, and Timeout().
Referenced by BLOCXX_NAMESPACE::Exec::gatherOutput().
|
static |
Definition at line 62 of file Timeout.hpp.
Referenced by BLOCXX_NAMESPACE::ThreadPool::addWork(), BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput(), BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput(), BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput(), BLOCXX_NAMESPACE::Exec::executeProcessAndGatherOutput(), BLOCXX_NAMESPACE::TimeoutTimer::infinite(), BLOCXX_NAMESPACE::PosixUnnamedPipe::passDescriptor(), BLOCXX_NAMESPACE::PosixUnnamedPipe::receiveDescriptor(), BLOCXX_NAMESPACE::Exec::system(), BLOCXX_NAMESPACE::Socket::waitForInput(), and BLOCXX_NAMESPACE::Socket::waitForOutput().
|
private |
Definition at line 82 of file Timeout.hpp.
Referenced by getAbsolute(), and Timeout().
|
private |
Definition at line 83 of file Timeout.hpp.
Referenced by getRelative(), and Timeout().
|
private |
Definition at line 81 of file Timeout.hpp.