Of course, python 2.6 doesn't have `.total_seconds()`

- Implement the equivalent as a utils function