How long does it take for a iphone to restore?

Ok so i jailbroke my iphone 4 a couple of weeks ago and it was coo n all. But i heard of the consequences or whatever and i was freaking tf out man. So i tried restoring it on my own but "Error" kept popping up, then i decided to go to this store by my school which basically repairs all types of stuff, i told them my problem and left my phone there but they said it might crash! Wtf so how long does it take for a restore?

About 20 minutes