2009-01-30 21 views

回答

22
import time 
print int(time.time()) 
5

time.time()這樣做,但它可能是浮動,而不是我認爲你期望的int。也就是說,某些系統的精度可能高於1秒。