How long does it take to gems and resources?

Actually, you get the resources immediately after the hack is used successfully, but sometimes this process can take a couple of minutes to complete.