Python: use monotonic timer and integers