Advertisement
jabela

Using DateTime for calculations

Oct 11th, 2017
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import datetime
  2. a = datetime.datetime.now()
  3. j = input("Reaction Test, Press Enter")
  4. b = datetime.datetime.now()
  5. c = b-a
  6. seconds = c.total_seconds()
  7.  
  8. # Test its a float seconds += 5
  9. print("You took",seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement