Which language are you using, assembly language or C language, for coding..??
-> In assembly it is easy, as the the instruction and the machine cycles(hence time taken) to execute can be easily calculated for the looping instructions (Jump, reload the values etc ..)
-> If you are using C language, go for some compilers like Keil and use the disaasembly for getting the equivalent assembly code for your C instructions, and then do the calculations.
Eg:
1) mov a,#23
2) label: dec a
3) jnz label
Here you can see that instructions 2,3 will execute 23 times and the 1st instrcution will execute only once. So based on the machine cycles and the no. of times the instruction executes, you can calculate the delay.
This was just an example, you have to use the timer delay in a loop.