mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 10:28:06 +00:00
Fix time taken
This commit is contained in:
parent
b567bde9c0
commit
e420a3eb41
@ -794,8 +794,12 @@ class StatusCheckResult(models.Model):
|
||||
|
||||
@property
|
||||
def took(self):
|
||||
"""
|
||||
Time taken by check in ms
|
||||
"""
|
||||
try:
|
||||
return (self.time_complete - self.time).microseconds / 1000
|
||||
diff = (self.time_complete - self.time).microseconds
|
||||
return (diff.microseconds + (diff.seconds + diff.days * 24 * 3600) * 10**6) / 1000
|
||||
except:
|
||||
return None
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
<th>Status</th>
|
||||
<th>Time started</th>
|
||||
<th>Time complete</th>
|
||||
<th>Took</th>
|
||||
<th>Took (ms)</th>
|
||||
<th>Error</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Loading…
x
Reference in New Issue
Block a user