Determine HZ exactly as in apps/speed.c.