从系统中获取时间 [英] Getting time from the system
问题描述
有没有可用于从系统中查找时间的函数?。我想查找执行后处理应用程序的开始时间和结束时间。
提前致谢
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屋!