Using rtx51tny in a at89s52 system, xtal :24MHz INT_CLOCK : 10000 cycles (tick period : 5ms)
In a delay sub take os_wait ( K_TMO , 1, 0);.When simulator ,firstly the function take 0.0047005sec(sim to 5ms) for running,secondly,thirdly the function take 0.002962sec & 0.002963sec ,and so on.when changed paramat as os_wait ( K_TMO , 300, 0);,the function take 0.2217675sec to finish. why does the function os_wait ( K_TMO , 1, 0); not take 5ms?
Note that the argument to os_wait cannot be greater than a byte (255 is therefore the maxium value.
This therefore fails os_wait ( K_TMO , 300, 0);
Also keep in mind that the execution is sychnonized with the hardware timer. os_wait ( K_TMO , 1, 0); effectively waits for the next timer tick (which might come instantly after the function call).