Python – time difference in milliseconds not working for me

Try using total_seconds method:

print time_diff_wind.total_seconds() * 1000

That method is equivalent to: (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6

Note: It’s available since version 2.7

Leave a Comment