There is no set amount of time. If you are pulled over and you look really stoned and you can't control yourself, you could get a DUI. I've never heard of anyone getting a DUI for marijuana because first the officer has to prove that you are impared by marijuana at that point in time which is pretty hard, but in theory if you are driving while under the influence of any drug that impairs your driving abilities you can get a DUI.

I personally find driving while stoned to be pleasureable and not really too hard at all. When i first started smoking however it was a little more dificult to judge depth perception so it was a little tricky, but now it is just fun.

Im not telling you to go out and drive stoned, its just my 2 cents on the subject.