Optimized time class.