#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <queue>
#include <signal.h>
#include "config.h"
#include "../debug/DebugUtils.h"
#include "../debug/Log.h"
#include "../util/Singleton.h"
#include "MsgQueue.h"
#include "OnOffNotifier.h"
#include "Thread.h"
Go to the source code of this file.
Namespaces | |
namespace | oasys |
Classes | |
class | oasys::TimerCompare |
The Timer comparison class. More... | |
class | oasys::TimerSystem |
The main Timer system implementation that needs to be driven by a thread, such as the TimerThread class defined below. More... | |
class | oasys::TimerThread |
A simple thread class that drives the TimerSystem implementation. More... | |
class | oasys::Timer |
A Timer class. More... | |
struct | oasys::TimerEvent |
For use with the QueuingTimer, this struct defines a TimerEvent, i.e. More... | |
class | oasys::QueuingTimer |
A Timer class that's useful in cases when a separate thread (i.e. More... | |
Defines | |
#define | TIMEVAL_DIFF(t1, t2, t3) |
Miscellaneous timeval macros. | |
#define | TIMEVAL_DIFF_DOUBLE(t1, t2) |
#define | TIMEVAL_DIFF_MSEC(t1, t2) |
#define | TIMEVAL_DIFF_USEC(t1, t2) |
#define | TIMEVAL_GT(t1, t2) |
#define | TIMEVAL_LT(t1, t2) |
Typedefs | |
typedef RETSIGTYPE( | sighandlerfn_t )(int) |
Typedef for a signal handler function. | |
typedef MsgQueue< TimerEvent > | oasys::TimerEventQueue |
The queue type used in the QueueingTimer. |
#define TIMEVAL_DIFF | ( | t1, | |||
t2, | |||||
t3 | ) |
#define TIMEVAL_DIFF_DOUBLE | ( | t1, | |||
t2 | ) |
Value:
((double)(((t1).tv_sec - (t2).tv_sec)) + \ (double)((((t1).tv_usec - (t2).tv_usec)) * 1000000.0))
Definition at line 76 of file Timer.h.
Referenced by oasys::RateEstimator::timeout().
#define TIMEVAL_DIFF_MSEC | ( | t1, | |||
t2 | ) |
Value:
((unsigned long int)(((t1).tv_sec - (t2).tv_sec) * 1000) + \ (((t1).tv_usec - (t2).tv_usec) / 1000))
Definition at line 80 of file Timer.h.
Referenced by dtn::CustodyTimer::CustodyTimer(), oasys::ProgressPrinter::done(), dtn::StreamConvergenceLayer::Connection::handle_poll_timeout(), dtn::Registration::init_expiration_timer(), oasys::TimerSystem::pop_timer(), oasys::TimerSystem::run_expired_timers(), oasys::TimerSystem::schedule_at(), and dtn::BluetoothConvergenceLayer::Connection::send_loop().
#define TIMEVAL_DIFF_USEC | ( | t1, | |||
t2 | ) |
#define TIMEVAL_GT | ( | t1, | |||
t2 | ) |
Value:
(((t1).tv_sec > (t2).tv_sec) || \ (((t1).tv_sec == (t2).tv_sec) && ((t1).tv_usec > (t2).tv_usec)))
Definition at line 88 of file Timer.h.
Referenced by oasys::TimerCompare::operator()().
#define TIMEVAL_LT | ( | t1, | |||
t2 | ) |
Value:
(((t1).tv_sec < (t2).tv_sec) || \ (((t1).tv_sec == (t2).tv_sec) && ((t1).tv_usec < (t2).tv_usec)))
Definition at line 92 of file Timer.h.
Referenced by oasys::TimerSystem::run_expired_timers().
typedef RETSIGTYPE( sighandlerfn_t)(int) |