Thread. Where is the delay!?

My thread sort of look like this:
thread >> run:

DIM j as int16
me.sleep(500, false)

FOR j = 1 TO 4

IF j = 1 THEN
  blablabla...
ELSEIF j = 2 THEN
  blablabla...
ELSEIF j = 3 THEN
  blablabla...
ELSEIF j = 4 THEN

me.sleep(300, false)

DIM i as Int16
FOR i = 0 TO 12
  blabla...
NEXT

NEXT

OK, you get the idea. There is one big j-loop and inside there is a smaller i-loop.
Is it even possible to change the delay on the inner loop or am I all wrong in these things…!?
There is something else wrong in the moment… all is running too fast and j seems not to be 4 even…
It’s confusing!

so where is problem?
it’s woken too early as there is no other thread?

Hmm…
Excuse me!
The question is, can I change the sleep to the second loop?

you can of course change that number 300 to another value.