Adjusting (re-targeting) difficulty for the PoW is a complex issue with Cryptocurrencies.
Bitcoin adjustment every 2016 10 minute blocks (two weeks), is very coarse, and is not usable for smaller coins, in the age of ASIC and GPU farm mining, where hashing on a particular network can change very rapidly, sometimes automated or performed for malicious reasons.
A range of algorithms and techniques are evolving and many have been implemented and deployed since.
- Kimoto Gravity Well (KGW)
- Nite’s Gravity Well
- Dark Gravity Wave
- Digishield from Dogecoin had time-warp vulnerabilities but was fixed-up in other coins since. Slingshield also made improvements of some sort.
- Zcash settled on adjustment for every block, after an extended discussion. They implemented a modified Digishield v3.
Despite prolonged discussions, Litecoin still does a Bitcoin-style re-targeting. Replacing Litecoin’s difficulty adjustment with the one in Zcash is desirable, but I cannot find an existing implementation.
Edit: Someone in the know, CryptoLife, for a pure PoW Scrypt configuration does offer options 1-4 above for the Difficulty, so it is doable.