I'm specifically looking for the difficulty retargetting period of Bitcoin Cash, but since it is a fork of Core it should be the same code.
Looks like the answer lies here for bitcoin Cash:
More specifically it is here:
Albert's link shows the "emergency difficulty adjustment" code. The basic 2016-block difficulty adjustment is defined in
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60;
This is the desired time in seconds between difficulty adjustments. You can also see below where they hardcode the corresponding number of blocks:
consensus.nMinerConfirmationWindow = 2016;