⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rvtimestamp.h

📁 基于h323协议的软phone
💻 H
字号:
/***********************************************************************
Filename   : rvtimestamp.h
Description: rvtimestamp header file
************************************************************************
      Copyright (c) 2001,2002 RADVISION Inc. and RADVISION Ltd.
************************************************************************
NOTICE:
This document contains information that is confidential and proprietary
to RADVISION Inc. and RADVISION Ltd.. No part of this document may be
reproduced in any form whatsoever without written prior approval by
RADVISION Inc. or RADVISION Ltd..

RADVISION Inc. and RADVISION Ltd. reserve the right to revise this
publication and make changes without obligation to notify any person of
such revisions or changes.
***********************************************************************/
/*$
{package:
    {name: Timestamp}
    {superpackage: CCore}
    {include: rvtimestamp.h}
    {description:
        {p: This module provides functions for accessing a timestamp. Timestamp values
            are guaranteed to be linear (will never go backwards) and will effectively
            never wrap (it will actually wrap in about 292 years).}
    }
}
$*/
#ifndef RV_TIMESTAMP_H
#define RV_TIMESTAMP_H

#include "rvccore.h"
#if (RV_OS_TYPE != RV_OS_TYPE_WINCE)
#include <time.h>
#endif
#include "rvtime.h"

#if !defined(RV_TIMESTAMP_TYPE) || ((RV_TIMESTAMP_TYPE != RV_TIMESTAMP_USER_DEFINED) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_LINUX) && (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_VXWORKS_NORMAL) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_VXWORKS_TIMESTAMP) && (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_PSOS) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_OSE) && (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_NUCLEUS) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_SOLARIS) && (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_WIN32) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_POSIX) && (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_UNIXWARE) && \
    (RV_TIMESTAMP_TYPE != RV_TIMESTAMP_EMBLINUX))
#error RV_TIMESTAMP_TYPE not set properly
#endif

/* Module specific error codes (-512..-1023). See rverror.h dor more details */
#define RV_TIMESTAMP_ERROR_NOCPUINFO -512 /* Linux only: /proc/cpuinfo file not found */
#define RV_TIMESTAMP_ERROR_NOTSC     -513 /* Linux only: CPU does not have TSC */
#define RV_TIMESTAMP_ERROR_NOMHZ     -514 /* Linux only: can't find CPU speed in /proc/cpuinfo */
#define RV_TIMESTAMP_ERROR_ZEROSPEED -515 /* CPU frequency of 0 reported */

#if defined(__cplusplus)
extern "C" {
#endif

/* Prototypes: See documentation blocks below for details. */
RvStatus RvTimestampInit(void);
RvStatus RvTimestampEnd(void);
RVCOREAPI RvInt64 RVCALLCONV RvTimestampGet(void);
RvInt64 RvTimestampResolution(void);

#if defined(RV_TEST_CODE)
void RvTimestampTest(void);
#endif /* RV_TEST_CODE */

#if defined(__cplusplus)
}
#endif

/* Function Documentation */
/*$
{function scope="protected":
    {name: RvTimestampInit}
    {superpackage: Timestamp}
    {include: rvtimestamp.h}
    {description:
        {p: Initializes the Timestamp module. Must be called once (and
            only once) before any other functions in the module are called.}
    }
    {proto: RvStatus RvTimestampInit(void); }
    {returns: RV_OK if successful otherwise an error code.}
}
$*/
/*$
{function scope="protected":
    {name: RvTimestampEnd}
    {superpackage: Timestamp}
    {include: rvtimestamp.h}
    {description:
        {p: Shuts down the Timestamp module. Must be called once (and
            only once) when no further calls to this module will be made.}
    }
    {proto: RvStatus RvTimestampEnd(void);}
    {returns: RV_OK if successful otherwise an error code.}
}
$*/
/*$
{function:
    {name: RvTimestampGet}
    {superpackage: Timestamp}
    {include: rvtimestamp.h}
    {description:
        {p: Gets a timestamp value in nanoseconds.  Values returned by subsequent calls
            are guaranteed to be linear (will never go backwards) and will never wrap.}
    }
    {proto: RvInt64 RvTimestampGet(void);}
    {returns: Nanasecond timestamp.}
}
$*/
/*$
{function:
    {name: RvTimestampResolution}
    {superpackage: Timestamp}
    {include: rvtimestamp.h}
    {description:
        {p: Gets the resolution of the timestamp in nanoseconds.}
    }
    {proto: RvInt64 RvTimestampResolution(void);}
    {returns: Resolution of the timestamp in nanoseconds.}
}
$*/

#endif

⌨️ 快捷键说明

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