MCPcopy
hub / github.com/django/django / _get_duration_components

Function _get_duration_components

django/utils/duration.py:4–15  ·  view source on GitHub ↗
(duration)

Source from the content-addressed store, hash-verified

2
3
4def _get_duration_components(duration):
5 days = duration.days
6 seconds = duration.seconds
7 microseconds = duration.microseconds
8
9 minutes = seconds // 60
10 seconds %= 60
11
12 hours = minutes // 60
13 minutes %= 60
14
15 return days, hours, minutes, seconds, microseconds
16
17
18def duration_string(duration):

Callers 2

duration_stringFunction · 0.85
duration_iso_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected