I've always used java.thread.sleep to make a delay to a policy but now
with IDM version 4.5 it seems not to work. It does not sleep the amount
of time and finally it causes driver to shut down due to timeouts. To my
eyes it looked like there was some kind of parallel processing involved
and it does not like java sleeps.

Do you have any suggestions for making a policy sleep for 10-30 seconds?
My identity source is sometimes making bursts of ou changes and I need
to slow them down to avoid congestion. Still I need it to perform fast
when it does not involve moving, which is a heavy burden for edirectory
(still is with 8.8.8.5?).

One idea is to do something like this:

<do-set-local-variable name="start" scope="policy">
<arg-string>
<token-time format="!CTIME" tz="UTC"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="now" scope="policy">
<arg-string>
<token-time format="!CTIME" tz="UTC"/>
</arg-string>
</do-set-local-variable>
<do-while notrace="true">
<arg-conditions>
<and>
<if-xpath op="true">$now &lt; ($start + 10)</if-xpath>
</and>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="now" scope="policy">
<arg-string>
<token-time format="!CTIME" tz="UTC"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-while>

This will wait for 10 seconds but also do a big amount of loops and I
have no idea of it's impact on memory etc. I'd love to have some simple
way to make it wait with every loop.

All suggestions welcome.