Python Tutorial

Thursday, August 19, 2010

python : time

'''
   This code use python time class syntax
'''
import time

'''
   return current date and time
'''
print "time.ctime() ",time.ctime()
'''
   Return current CPU time
'''
print "time.clock() ",time.clock()





Output:
time.ctime()  Thu Aug 19 14:46:02 2010
time.clock()  107.072719637

0 comments:

Post a Comment