Zaslat SMS: A Theory of Ultimately Periodic Languages and Automata With an Application to Time Granularity