If you shake it with the pressure set for the level of carbonation you want, it takes less than 15 minutes.
After that, you'll be about 98% where you want to be.
It's never good right after you shake it. Also, you have to blow down the keg if you have a short beer out hose, and there is always tons of foam after shaking.
Let it sit for a day, then try it.
Or..........put your maintenance pressure on and let sit for 7 days = perfect.