MikroC provides the built-in function Delay_ms for producing simple blocking software delays.
Delay_ms(250);
This should work unless you have other specific constraints.
The method you've shown is a bit of a hack. For some specific PIC with a specific clock an empty for
loop with 165 iteration likely takes about 1ms, so the outer loop simply counts milliseconds by running the inner loop itime
times for itime
milliseconds.
You should not use a method like this because it is highly specific to a particular PIC running at a particular clock speed and also depends on the compiler not simply optimizing away the whole loop. The built-in delay function should always just do the right thing no matter which PIC you're building for.