📄 vm_time_linux32.c
字号:
/*//// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -