Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime