Add maxtime to the CPP version.