Proper time & code-condensation

Thanks for the pointer, BevapDin.
Merge pull request #6943 from KA101/MiningFix

Proper time & code-condensation