亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? timer.h

?? This software aims to create an applet and panel tools to manage a wireless interface card, such as
?? H
字號(hào):
//
// Timer.h
//
// $Id: //poco/Main/Foundation/include/Foundation/Timer.h#5 $
//
// Definition of the Timer and related classes.
//
// Copyright (c) 2004, Guenter Obiltschnig/Applied Informatics.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//
// 3. Redistributions in any form must be accompanied by information on
//    how to obtain complete source code for this software and any
//    accompanying software that uses this software.  The source code
//    must either be included in the distribution or be available for no
//    more than the cost of distribution plus a nominal fee, and must be
//    freely redistributable under reasonable conditions.  For an
//    executable file, complete source code means the source code for all
//    modules it contains.  It does not include source code for modules or
//    files that typically accompany the major components of the operating
//    system on which the executable file runs.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//


#ifndef Foundation_Timer_INCLUDED
#define Foundation_Timer_INCLUDED


#ifndef Foundation_Foundation_INCLUDED
#include "Foundation/Foundation.h"
#endif
#ifndef Foundation_Runnable_INCLUDED
#include "Foundation/Runnable.h"
#endif
#ifndef Foundation_Mutex_INCLUDED
#include "Foundation/Mutex.h"
#endif
#ifndef Foundation_Event_INCLUDED
#include "Foundation/Event.h"
#endif


Foundation_BEGIN


class AbstractTimerCallback;


class Foundation_API Timer: protected Runnable
	/// This class implements a thread-based timer.
	/// A timer starts a thread that first waits for a given start interval.
	/// Once that interval expires, the timer callback is called repeatedly
	/// in the given periodic interval. If the interval is 0, the timer is only
	/// called once.
	/// The timer callback method can stop the timer by setting the 
	/// timer's periodic interval to 0.
	///
	/// The timer callback runs in its own thread, so multithreading
	/// issues (proper synchronization) have to be considered when writing 
	/// the callback method.
	///
	/// The exact interval at which the callback is called depends on many 
	/// factors like operating system, CPU performance and system load and
	/// may differ from the specified interval.
	///
	/// The timer thread is taken from the global default thread pool, so
	/// there is a limit to the number of available concurrent timers.
{
public:
	Timer(long startInterval = 0, long periodicInterval = 0);
		/// Creates a new timer object. StartInterval and periodicInterval
		/// are given in milliseconds. If a periodicInterval of zero is 
		/// specified, the callback will only be called once, after the
		/// startInterval expires.
		/// To start the timer, call the Start() method.

	virtual ~Timer();
		/// Stops and destroys the timer.

	void start(const AbstractTimerCallback& method);
		/// Starts the timer.
		/// Create the TimerCallback as follows:
		///     TimerCallback<MyClass> callback(*this, &MyClass::onTimer);
		///     timer.start(callback);
		
	void stop();
		/// Stops the timer. If the callback method is currently running
		/// it will be allowed to finish first.
		/// WARNING: Never call this method from within the callback method,
		/// as a deadlock would result. To stop the timer from within the
		/// callback method, call restart(0).

	void restart();
		/// Restarts the periodic interval. If the callback method is already running,
		/// nothing will happen.

	void restart(long milliseconds);
		/// Sets a new periodic interval and restarts the timer.
		/// An interval of 0 will stop the timer.

	long getStartInterval() const;
		/// Returns the start interval.

	void setStartInterval(long milliseconds);
		/// Sets the start interval. Will only be 
		/// effective before start() is called.

	long getPeriodicInterval() const;
		/// Returns the periodic interval.

	void setPeriodicInterval(long milliseconds);
		/// Sets the periodic interval. If the timer is already running
		/// the new interval will be effective when the current interval
		/// expires.

protected:
	void run();

private:
	volatile long _startInterval;
	volatile long _periodicInterval;
	Event         _wakeUp;
	Event         _done;
	AbstractTimerCallback* _pCallback;
	mutable FastMutex      _mutex;
};


class Foundation_API AbstractTimerCallback
	/// This is the base class for all instantiations of
	/// the TimerCallback template.
{
public:
	AbstractTimerCallback();
	AbstractTimerCallback(const AbstractTimerCallback& callback);
	virtual ~AbstractTimerCallback();
	
	AbstractTimerCallback& operator = (const AbstractTimerCallback& callback);

	virtual void invoke(Timer& timer) const = 0;
	virtual AbstractTimerCallback* clone() const = 0;
};


template <class C> 
class TimerCallback: public AbstractTimerCallback
	/// This template class implements an adapter that sits between
	/// a Timer and an object's method invoked by the timer.
	/// It is quite similar in concept to the RunnableAdapter, but provides 
	/// some Timer specific additional methods.
	/// See the Timer class for information on how
	/// to use this template class.
{
public:
	typedef void (C::*Callback)(Timer&);

	TimerCallback(C& object, Callback method): _pObject(&object), _method(method)
	{
	}

	TimerCallback(const TimerCallback& callback): _pObject(callback._pObject), _method(callback._method)
	{
	}

	~TimerCallback()
	{
	}

	TimerCallback& operator = (const TimerCallback& callback)
	{
		if (&callback != this)
		{
			_pObject = callback._pObject;
			_method  = callback._method;
		}
		return *this;
	}

	void invoke(Timer& timer) const
	{
		(_pObject->*_method)(timer);
	}

	AbstractTimerCallback* clone() const
	{
		return new TimerCallback(*this);
	}

private:
	TimerCallback();

	C*       _pObject;
	Callback _method;
};


Foundation_END


#endif // Foundation_Timer_INCLUDED

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区在线播放| 欧美在线免费观看亚洲| 亚洲一区视频在线| 国产精品视频在线看| 欧美一区二区在线播放| 国产99一区视频免费| 亚洲国产日韩一区二区| 亚洲精品国产品国语在线app| 中文字幕一区二区在线播放| 99视频精品全部免费在线| 麻豆一区二区在线| 日韩高清在线观看| 天天av天天翘天天综合网 | 日本福利一区二区| 国产传媒欧美日韩成人| 久久国产婷婷国产香蕉| 轻轻草成人在线| 免费成人结看片| 九九国产精品视频| 精品一区二区三区影院在线午夜| 日本在线不卡一区| 美女网站视频久久| 国内精品久久久久影院一蜜桃| 日韩av中文在线观看| 强制捆绑调教一区二区| 免费黄网站欧美| 高清国产一区二区| 99v久久综合狠狠综合久久| caoporen国产精品视频| 色综合咪咪久久| 欧美日韩一卡二卡三卡| 日韩一区二区三区在线观看| 欧美电视剧在线看免费| 国产精品美女久久久久aⅴ国产馆| 国产欧美精品一区二区色综合朱莉| 国产欧美日韩不卡免费| 亚洲午夜羞羞片| 免费成人美女在线观看.| 九九在线精品视频| 国产99久久久国产精品免费看| 风间由美性色一区二区三区| 91小视频在线观看| 日韩欧美一卡二卡| 亚洲精品成人精品456| 寂寞少妇一区二区三区| 色网综合在线观看| 精品少妇一区二区三区| 亚洲黄色片在线观看| 久久国产尿小便嘘嘘尿| 在线免费不卡视频| 中文字幕成人网| 国内精品第一页| 欧美日韩一区二区在线视频| xnxx国产精品| 日本不卡视频一二三区| 欧美性猛交xxxx乱大交退制版| 久久综合色播五月| 日韩电影在线免费看| 色综合久久综合网97色综合| 4438成人网| 日日摸夜夜添夜夜添精品视频 | 欧美极品aⅴ影院| 蜜臀久久99精品久久久久宅男| 欧美在线一二三四区| 亚洲美女视频在线观看| 99久久99精品久久久久久| 亚洲精品一区二区精华| 麻豆免费看一区二区三区| 欧美精品丝袜久久久中文字幕| 亚洲成人免费视| 欧美伊人久久久久久久久影院 | av在线播放一区二区三区| 国产色产综合色产在线视频| 国内精品久久久久影院一蜜桃| 日韩欧美在线网站| 国内精品不卡在线| 国产日韩欧美高清| 99综合影院在线| 亚洲一区二区三区激情| 欧美美女bb生活片| 国产又黄又大久久| 国产精品黄色在线观看| 色综合久久综合网欧美综合网| 一区二区三区国产精华| 欧美精品久久天天躁| 国内精品免费**视频| 国产欧美一区二区三区在线老狼| 高清av一区二区| 一区二区国产盗摄色噜噜| 欧美福利视频一区| 激情综合色综合久久| 亚洲欧美另类在线| 精品毛片乱码1区2区3区| 国产suv一区二区三区88区| 亚洲天堂2014| 久久久噜噜噜久久人人看| 91老司机福利 在线| 蜜桃一区二区三区在线观看| 国产精品欧美一区喷水| 欧美日本乱大交xxxxx| 高清国产一区二区三区| 日韩1区2区3区| 一区二区视频在线看| 久久影院午夜片一区| 欧美日韩成人综合在线一区二区| 国产精品中文字幕一区二区三区| 亚洲成年人影院| 亚洲欧美日韩中文播放| 国产午夜精品一区二区三区视频 | 成人久久久精品乱码一区二区三区 | 国产精品无遮挡| 成人小视频在线| 亚洲欧美国产77777| 日韩欧美色电影| www.色综合.com| 亚洲人亚洲人成电影网站色| 欧美性大战久久久久久久蜜臀| 久久精品噜噜噜成人88aⅴ| 日本韩国一区二区| 不卡电影免费在线播放一区| 国产尤物一区二区在线| 日韩精品每日更新| 日韩国产一区二| 青青草成人在线观看| 日本伊人午夜精品| 美女精品一区二区| 蜜臀国产一区二区三区在线播放 | 972aa.com艺术欧美| 捆绑变态av一区二区三区| 亚洲国产成人私人影院tom| 久久只精品国产| 亚洲国产高清aⅴ视频| 亚洲欧美激情在线| 午夜精品久久久久久久99水蜜桃| 午夜私人影院久久久久| 免费观看在线色综合| 国产精品一卡二卡| 国产成人无遮挡在线视频| 9人人澡人人爽人人精品| 一本大道久久a久久综合| 欧美丰满高潮xxxx喷水动漫| 亚洲精品一区二区三区福利| 亚洲日本在线a| 另类小说色综合网站| av高清不卡在线| 91精品国产欧美日韩| 日本一区二区三区电影| 亚洲网友自拍偷拍| 国产一区二区三区久久久| 欧美网站一区二区| 国产色91在线| 蜜臀a∨国产成人精品| av一区二区久久| 精品电影一区二区| 日韩中文字幕91| 成人性生交大片免费看视频在线 | 久久伊人中文字幕| 亚洲va韩国va欧美va精品| 国产成人av电影在线观看| 欧美精品丝袜久久久中文字幕| 国产精品久久毛片| 国产精品一区在线观看乱码 | 在线精品亚洲一区二区不卡| 久久精品一区二区| 国产原创一区二区三区| 欧美大片拔萝卜| 日本午夜一区二区| 欧美日韩在线精品一区二区三区激情| 欧美极品美女视频| 国产成人综合精品三级| 欧美精品一区视频| 精品一区二区三区在线观看国产| 91精品国产综合久久小美女| 婷婷一区二区三区| 91精品国产综合久久久久久久久久| 亚洲国产精品视频| 欧洲视频一区二区| 亚洲国产欧美另类丝袜| 欧美综合在线视频| 男男视频亚洲欧美| 久久综合视频网| 97se狠狠狠综合亚洲狠狠| 亚洲综合在线免费观看| 色偷偷成人一区二区三区91| 一区二区免费在线| 欧美精品在线一区二区三区| 日本亚洲视频在线| 精品播放一区二区| www.日韩大片| 午夜不卡av在线| 欧美国产成人精品| 色又黄又爽网站www久久| 丝袜亚洲精品中文字幕一区| 久久综合九色综合97婷婷女人| 国产传媒久久文化传媒| 亚洲成人免费视频| 国产午夜一区二区三区| 欧美色大人视频| 国产成人午夜片在线观看高清观看| 亚洲精品水蜜桃|