Timeout counter
Public Methods
-
TimeoutCounter(unsigned int timeout, const string &name)
- Creates counter with start time now and end time now+timeout.
-
unsigned int timeLeft() const
- retunrs time left before timeout expiration (in seconds)
-
bool isExpired() const
- Returns 'true' if timeout is expired
-
void check() const throw(FWException)
- Throw exception if timeout is expired
-
ssize_t read(int fd, void* buf, size_t n) const throw(FWException)
- Reads from socket/file.
Documentation
Timeout counter
TimeoutCounter(unsigned int timeout, const string &name)
-
Creates counter with start time now
and end time now+timeout. String is counter
name which will be used in thrown exception
in check() method.
NB: timeout is in whole seconds.
unsigned int timeLeft() const
-
retunrs time left before
timeout expiration (in seconds)
bool isExpired() const
-
Returns 'true' if timeout is expired
void check() const throw(FWException)
-
Throw exception if timeout is expired
ssize_t read(int fd, void* buf, size_t n) const throw(FWException)
-
Reads from socket/file.
Throws FWException if timeout occured.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.