WvStreams
wvtimeoutstream.cc
1/*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * See wvtimeoutstream.h.
6 */
7#include "wvtimeoutstream.h"
8
9WvTimeoutStream::WvTimeoutStream(time_t msec) :
10 ok(true)
11{
12 alarm(msec);
13}
14
16{
18
19 // reset the alarm if it has gone off
20 if (alarm_was_ticking) ok = false;
21}
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
bool alarm_was_ticking
This will be true during callback execution if the callback was triggered by the alarm going off.
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...