📄 timer.c
字号:
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// 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) 1999 Intel Corporation. All Rights Reserved.
//
// RCS:
// $Source: timer.c$
// $Revision: 00.00.05$
// Purpose:
// Contents:
// Authors:
// Sergey Oblomov
//
//M*/
#include "ats.h"
/*F///////////////////////////////////////////////////////////////////////////////////////
// Name: atsTimerStart
// Purpose: Setting privileges level for task highest
// Context:
// Parameters:
// Returns:
// Notes:
//F*/
void atsTimerStart( int param )
{
trsTimerStart( param );
return;
}
/*F///////////////////////////////////////////////////////////////////////////////////////
// Name: atsTimerStop
// Purpose: Setting privileges level for task highest
// Context:
// Parameters:
// Returns:
// Notes:
//F*/
void atsTimerStop( int param )
{
trsTimerStop(param);
return;
}
/* static void vf();
double atsGetTime(int (*func_ptr)())
{
int i,j;
double time_min=0,delay=0;
__asm int 0f0h
__asm cli
for(j=0;j<100;j++){
start_count(&time);
for(i=0;i<10;i++) vf();
stop_count(&time);
if(!delay) delay=time.value;
else if(time.value<delay) delay=time.value;
}
for(j=0;j<100;j++){
start_count(&time);
for(i=0;i<10;i++) (*func_ptr)();
stop_count(&time);
if(!time_min) time_min=time.value;
else if(time.value<time_min) time_min=time.value;
}
__asm sti
time_min-=delay;
time_min/=10;
return time_min;
}
static void vf()
{
__asm nop
return;
} */
/* End of file. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -