How to implement offline earning coins

What you ask for is not unified
And is different from game to game

That is why you have very slim chances to get exact answer to your question
And when you say please don’t paste some 4 years old blog or wiki
You cut yourself from getting any answer at all

So how about this for answer?

TimeStamp Extension to Calcuate Time When Game is Closed

Offline Rewards