擅长:python、mysql、java
<p><a href="https://stackoverflow.com/a/766382">One of the answers</a>你链接的帖子说:</p>
<blockquote>
<p>Be aware that <code>c.microseconds</code> only returns the microseconds portion of the timedelta! For timing purposes always use <code>c.total_seconds()</code>.</p>
</blockquote>
<p>如果你想要微秒的部分,你还期望什么?两个日期的秒数的小数部分相等,因此差值为0。你知道吗</p>
<p>否则,使用<code>result.total_seconds() * 1e6 + result.microseconds</code>。你知道吗</p>