mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340)
This commit is contained in:
parent
013e659e49
commit
6fbd889d6e
2 changed files with 9 additions and 1 deletions
|
@ -340,7 +340,7 @@ class LogRecord(object):
|
|||
self.lineno = lineno
|
||||
self.funcName = func
|
||||
self.created = ct
|
||||
self.msecs = (ct - int(ct)) * 1000
|
||||
self.msecs = int((ct - int(ct)) * 1000) + 0.0 # see gh-89047
|
||||
self.relativeCreated = (self.created - _startTime) * 1000
|
||||
if logThreads:
|
||||
self.thread = threading.get_ident()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue