Lets say you want players to have... magic points.
Minimum 0, maximum 50. Every hour they get 5 magic points and they use them one your clickables.
Compare the current time to the last time they accessed some place, and adjust the points accordingly.
For example, they opened the chest of bacon at 14:00, and had 30 magic points. Now it is 16:00, that means their magic points should increase by 10 and they are left with 40.
They use 15 magic points to cook some bacon, now they have 25 magic points etc.