[core] Implement a real timing system.