class libfwbuilder::TimeoutCounter

Timeout counter

Public Methods

[more] TimeoutCounter(unsigned int timeout, const string &name)
Creates counter with start time now and end time now+timeout.
[more]unsigned int timeLeft() const
retunrs time left before timeout expiration (in seconds)
[more]bool isExpired() const
Returns 'true' if timeout is expired
[more]void check() const throw(FWException)
Throw exception if timeout is expired
[more]ssize_t read(int fd, void* buf, size_t n) const throw(FWException)
Reads from socket/file.


Documentation

Timeout counter
o 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.

ounsigned int timeLeft() const
retunrs time left before timeout expiration (in seconds)

obool isExpired() const
Returns 'true' if timeout is expired

ovoid check() const throw(FWException)
Throw exception if timeout is expired

ossize_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++.