从系统中获取时间 [英] Getting time from the system

查看:66
本文介绍了从系统中获取时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有可用于从系统中查找时间的函数?。我想查找执行后处理应用程序的开始时间和结束时间。


提前致谢

PSB

Hi,

Is there any functions available for finding the time from the system?.I would like to find the start time and end time of the processing of the application after execution.

Thanks in advance
PSB

推荐答案





有没有可用于从系统中查找时间的函数?。我想查找应用程序处理后的开始时间和结束时间执行。


提前谢谢

PSB
Hi,

Is there any functions available for finding the time from the system?.I would like to find the start time and end time of the processing of the application after execution.

Thanks in advance
PSB



查看时间模块。你应该花一些时间这里,尤其是库参考

check out the time module. you should really spend some time here , especially the library reference






有没有可用于从系统中查找时间的函数?。我想查找应用程序处理后的开始时间和结束时间执行。


提前致谢

PSB
Hi,

Is there any functions available for finding the time from the system?.I would like to find the start time and end time of the processing of the application after execution.

Thanks in advance
PSB



来自时间模块:

>>>导入时间

>>> time.localtime(time.time())

(2007,3,6,22,8,18,1,65,0)

>>> ; time.strftime(''%H:%M:%S'',time.localtime(time.time()))

''22:08:50''

>>>

From the time module:
>>> import time
>>> time.localtime(time.time())
(2007, 3, 6, 22, 8, 18, 1, 65, 0)
>>> time.strftime(''%H:%M:%S'', time.localtime(time.time()))
''22:08:50''
>>>


再次查看OP的帖子,我认为他需要timeit模块.. :)
looking at the OP''s post again, i think he needs the timeit module.. :)


这篇关于从系统中获取时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆