user30017: 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.

user30017: Looks like the answer lies here for bitcoin Cash:
https://reviews.bitcoinabc.org/rABC7ad1105f43d7bff158d4b5c882ab9bf1b74d6cce 
More specifically it is here:
https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/pow.cpp#L73

user5757: Albert's link shows the "emergency difficulty adjustment" code.  The basic 2016-block difficulty adjustment is defined in chainparams.cpp:
    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;


30017: <p>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.</p>
 30017: <p>Looks like the answer lies here for bitcoin Cash:<br>
<a href="https://reviews.bitcoinabc.org/rABC7ad1105f43d7bff158d4b5c882ab9bf1b74d6cce" rel="nofollow noreferrer">https://reviews.bitcoinabc.org/rABC7ad1105f43d7bff158d4b5c882ab9bf1b74d6cce</a>   </p>

<p>More specifically it is here:<br>
<a href="https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/pow.cpp#L73" rel="nofollow noreferrer">https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/pow.cpp#L73</a></p>
 5757: <p>Albert's link shows the "emergency difficulty adjustment" code.  The basic 2016-block difficulty adjustment is defined in <a href="https://github.com/Bitcoin-ABC/bitcoin-abc/blob/8a4cecc3763cb194a494385b45428f1736082d52/src/chainparams.cpp#L108" rel="nofollow noreferrer"><code>chainparams.cpp</code></a>:</p>

<pre><code>    consensus.nPowTargetTimespan = 14 * 24 * 60 * 60;
</code></pre>

<p>This is the desired time in seconds between difficulty adjustments.  You can also see <a href="https://github.com/Bitcoin-ABC/bitcoin-abc/blob/8a4cecc3763cb194a494385b45428f1736082d52/src/chainparams.cpp#L115" rel="nofollow noreferrer">below</a> where they hardcode the corresponding number of blocks:</p>

<pre><code>    consensus.nMinerConfirmationWindow = 2016;
</code></pre>
