📄 rvtimermgr.h
字号:
#if (0)
******************************************************************************
Filename :
Description :
******************************************************************************
Copyright (c) 1999 RADVision Inc.
************************************************************************
NOTICE:
This document contains information that is proprietary to RADVision LTD.
No part of this publication may be reproduced in any form whatsoever
without written prior approval by RADVision LTD..
RADVision LTD. reserves the right to revise this publication and make
changes without obligation to notify any person of such revisions or
changes.
******************************************************************************
$Revision:$
$Date:$
$Author: S. Cipolli$
******************************************************************************
#endif
#ifndef RV_TIMERMGR_H
#define RV_TIMERMGR_H
#include "rvtypes.h"
#include "rvalloc.h"
#include "rvdefalloc.h"
#include "rvmutex_.h"
#include "rvthread_.h"
#include "rvtimer.h"
#include "rvtime.h"
#include "rvptrvector.h"
typedef enum {
RV_TIMERMGRSTATE_UNBORN,
RV_TIMERMGRSTATE_ALIVE,
RV_TIMERMGRSTATE_DEAD
} RvTimerMgrState;
typedef RvPtrVector RvTimerMgrHeap;
typedef struct {
RvMutex_ mutex;
RvThread_ thread;
RvTimerMgrHeap heap;
RvTimerMgrState state;
unsigned int id;
unsigned int period;
RvHrtime started;
#if defined(RV_TIMERSTATS_ON)
RvHrtime totalDelta;
int count;
#endif
} RvTimerMgr;
#if defined(__cplusplus)
extern "C" {
#endif
#define rvTimerMgrConstruct(tm, p) \
(rvTimerMgrConstructA((tm), (p), &rvDefaultAlloc))
RvTimerMgr* rvTimerMgrConstructA(RvTimerMgr* tm, unsigned int period,
RvAlloc* a);
void rvTimerMgrDestruct(RvTimerMgr* tm);
RvBool rvTimerMgrAdd(RvTimerMgr* tm, RvTimer* t);
RvBool rvTimerMgrRemove(RvTimerMgr* tm, RvTimer* t);
RvBool rvTimerMgrReset(RvTimerMgr* tm, RvTimer* t, RvHrtime nanosec);
size_t rvTimerMgrSize(const RvTimerMgr* tm);
/* Useful for debugging timer problems */
size_t rvTimerMgrFind(RvTimerMgr* tm, RvTimer* t);
#if defined(__cplusplus)
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -