Update of /cvsroot/pclasses/pclasses2/include/pclasses/System
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9521/include/pclasses/System
Added Files:
Timer.h
Log Message:
Since we now have the cool signal-handling code, it makes this Timer possible!
--- NEW FILE: Timer.h ---
/***************************************************************************
* Copyright (C) 2005 by Christian Prochnow, SecuLogix GmbH *
* cp...@se... *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef P_System_Timer_h
#define P_System_Timer_h
#include <pclasses/Export.h>
#include <pclasses/Signal.h>
namespace P {
namespace System {
class EventQueue;
class PSYSTEM_EXPORT Timer {
public:
Timer();
Timer(EventQueue& evq);
virtual ~Timer();
void start(unsigned int timeout, bool singleShot = true);
void stop();
bool active() const throw();
Signal0<void> sigExpired;
class Handle;
protected:
virtual void expired();
private:
Handle* _handle;
};
} // !namespace System
} // !namespace P
#endif
|