runnable.h

来自「linux下的终端管理工具源码」· C头文件 代码 · 共 68 行

H
68
字号
/***************************************************************************//*                                                                         *//* Copyright (c) 2005, 2006 2X Software Ltd, http://www.2X.com., NoMachine *//*                                                                         *//* NXCOMP, NX protocol compression and NX extensions to this software      *//* are copyright of Nomachine. Redistribution and use of the present       *//* software is allowed according to terms specified in the file LICENSE    *//* which comes in the source distribution.                                 *//*                                                                         *//* NX and NoMachine are trademarks of Medialogic S.p.A.                    *//*                                                                         *//* 2X is a trademark of 2X Software Ltd.                                   *//*                                                                         *//* All rights reserved.                                                    *//*                                                                         *//***************************************************************************/#ifndef Runnable_H#define Runnable_H#include <sys/types.h>#include <stdlib.h>#include <unistd.h>#include <signal.h>#include "Timestamp.h"class Runnable{  protected:  Runnable()  {  }  ~Runnable()  {  }  static int setTimer(const T_timestamp timeout);  static int resetTimer();  static void handleTimer(int signal);  static int setValue(char *&recipient, const char *value);  static void resetValue(char *&recipient)  {    delete [] recipient;    recipient = NULL;  }  private:  typedef struct  {    struct sigaction action_;    struct itimerval value_;    int              count_;  } T_runnable_timer;  static T_runnable_timer *timer_;};#endif /* Runnable_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?