We should handle this result2.time==0 case here without throwing exception.  Maybe:

```
if result2.time == 0:
   return float('inf') * result1.time
```