Python - time difference in milliseconds not working for me

前端 未结 5 2101
野性不改
野性不改 2020-12-05 22:51

I\'ve read a few posts about this and thought I had some code that worked. If the difference between the 2 values is less than a 1sec then the millisecs displayed is correct

5条回答
  •  温柔的废话
    2020-12-05 23:29

    From the documentation:

    Instance attributes (read-only):

    Attribute Value

    days Between -999999999 and 999999999 inclusive

    seconds Between 0 and 86399 inclusive

    microseconds Between 0 and 999999 inclusive

    Microseconds never exceed 999,999. Hence your milliseconds never exceed 999.

提交回复
热议问题