0
begin = datetime.datetime.now()
third = [third for third in third_list if third]
end = datetime.datetime.now()
diff = end-begin

print('time: ', diff.microseconds)

It has 'seconds' and 'microseconds'. Why doesn't it have a millseconds unit?

marlon
  • 6,029
  • 8
  • 42
  • 76

1 Answers1

4

Yeah, its not there. But isn't milliseconds the same as dividing microsecond by 1000?

>>> diff.microseconds
7948
>>> diff.microseconds/1000
7.948  #miliseconds
ThePyGuy
  • 17,779
  • 5
  • 18
  • 45