difftime.c
来自「C标准库源代码」· C语言 代码 · 共 41 行
C
41 行
/***
*difftime.c - return difference between two times as a double
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Find difference between two time in seconds.
*
*******************************************************************************/
#include <cruntime.h>
#include <time.h>
/***
*double difftime(b, a) - find difference between two times
*
*Purpose:
* returns difference between two times (b-a)
*
* Multi-thread version must use pascal calling convention to be re-entrant.
*
*Entry:
* long a, b - times to difference (actually are time_t values)
*
*Exit:
* returns a double with the time in seconds between two times
*
*Exceptions:
*
*******************************************************************************/
double __cdecl difftime (
time_t b,
time_t a
)
{
return( (double)( b - a ) );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?