defftime函数输出错误
#include<time.h>#include<stdio.h>
#include<dos.h>
main()
{
time_t start, end;
start = time(NULL);
sleep(10);
end = time(NULL);
printf("runtime is:%f(s)\n", difftime(start,end));
getch();
}
请问这条代码哪里出错了,谢谢!
2011-05-20 22:36
2011-05-21 07:24
2011-05-21 07:33
程序代码:#include<time.h>
#include<stdio.h>
#include<windows.h>
main()
{
time_t start, end;
start = time(NULL);
Sleep(10);
end = time(NULL);
printf("runtime is:%f(s)\n", difftime(start,end));
getchar();
}

2011-05-21 09:28
2011-05-21 23:13