Fortran 程序怎么最简单的统计CPU计算时间
1个回答
展开全部
cpu_time是Compaq fortran自带的一个库函数,返回的是一个浮点型,表示当前CPU运行时间(以秒计)示例:
program test_cpu_time
real ::start, finish
call cpu_time(start)
! put code to test here call
cpu_time(finish)
print '("Time = ",f6.3," seconds.")',finish-start
end
program test_cpu_time
program test_cpu_time
real ::start, finish
call cpu_time(start)
! put code to test here call
cpu_time(finish)
print '("Time = ",f6.3," seconds.")',finish-start
end
program test_cpu_time
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询