# 0508.py import time t=time.localtime(); print t # (2008, 1, 12, 14, 46, 17, 5, 12, 0) # anno, mese, giorno, ora, minuti, secondi, giorno della settimana (0 = lunedi'), # giorno nell'anno, 1 se tempo estivo. print time.strftime('%d %b %Y, %H:%M',t) # 12 Jan 2008, 14:46 print time.ctime() # Sat Jan 12 14:46:17 2008 print time.time() # 1200145577.23 for i in range(1000000): pass print time.time() # 1200145577.38