mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
Fixed timedelta_isoformat
This commit is contained in:
parent
0cb6df1f7b
commit
48cc9d94cd
2 changed files with 3 additions and 3 deletions
|
|
@ -90,6 +90,6 @@ else:
|
|||
return datetime_module.time(hour, minute, second, microsecond)
|
||||
|
||||
|
||||
def timedelta_isoformat(timedelta):
|
||||
def timedelta_isoformat(timedelta, timespec='microseconds'):
|
||||
time = (datetime_module.datetime.min + timedelta).time()
|
||||
return time_isoformat(time)
|
||||
return time_isoformat(time, timespec)
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ class Tracer:
|
|||
start_time = self.start_times[frame]
|
||||
duration = datetime_module.datetime.now() - start_time
|
||||
now_string = pycompat.timedelta_isoformat(
|
||||
duration) if not self.normalize else ' ' * 15
|
||||
duration, timespec='microseconds') if not self.normalize else ' ' * 15
|
||||
else:
|
||||
now = datetime_module.datetime.now().time()
|
||||
now_string = pycompat.time_isoformat(now, timespec='microseconds') if not self.normalize else ' ' * 15
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue