Better time.nice and time.ticks. Fixes #1434.