The Bitcoin block mining reward halves every 210,000 blocks. When it halves the mining reward will go from 12.5 BCH to 6.25 BCH per block. This is a simple count down timer that calculates the targeted halvening block height minus the current block height multiplied by the Bitcoin 10 minute block time interval (X - Y) * 10 * 60. This is an estimate and won't be 100% accurate since not all Bitcoin blocks are found exactly in 10 minute intervals due to the time in between difficulty adjustments