Delay python code

Is there a way to delay python in BGE?
I want python to load objects, but only 1 at a time…otherwise there is too much of a jump in frame rate.

I tried making it sleep, but there seems to be a very small if no effect on the code.

eg (time.sleep(500.0))

I know I can use the logic bricks, but that would just be a pain and become a mission.
Any ideas?
Thanks in advance.

Hmmm, it seems you need some unerstanding where the Python controller is in a game loop…

All triggered controller are executed exactly ones within one logic run. If you “delay” one controller your delay the frame (loop run) and produce a lag.

If you want to load one object in one frame, you just need a python controller that loads exactly one object. The next run it loads the next object and so on.