vm_time_linux32.c

来自「这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数」· C语言 代码 · 共 46 行

C
46
字号
/*////                  INTEL CORPORATION PROPRIETARY INFORMATION//     This software is supplied under the terms of a license agreement or//     nondisclosure agreement with Intel Corporation and may not be copied//     or disclosed except in accordance with the terms of that agreement.//       Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//*/#ifdef LINUX32#include <unistd.h>#include <sys/time.h>#include <sched.h>#include "vm_time.h"/* yield the execution of current thread for msec miliseconds */void vm_time_sleep(unsigned int msec){    if (msec)        usleep(1000 * msec);    else        sched_yield();} /* void vm_time_sleep(unsigned int msec) *//* obtain the clock tick of an uninterrupted master clock */vm_tick vm_time_get_tick(void){    struct timeval tv;    gettimeofday(&tv, NULL);    return (vm_tick)tv.tv_sec * (vm_tick)1000000 + (vm_tick)tv.tv_usec;} /* vm_tick vm_time_get_tick(void) *//* obtain the master clock resolution */vm_tick vm_time_get_frequency(void){    return (vm_tick)1000000;} /* vm_tick vm_time_get_frequency(void) */#endif /* LINUX32 */

⌨️ 快捷键说明

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