You go to the GTS.
Deposit a pokemon.
While it's depositing theres a clock kinda thing.
Well when it's on it's either spin, right when it goes in to it's eighth spin turn off the DS.
But I don't suggest you do it unless you know you got it down.
It can mess up your game file.