If you wanted 6 seconds but got 4 there was something else seriously wrong. You can make delays in three ways:
1. a software loop. Knowing the clock speed and how many cycles each instruction takes you can 'waste' as many instructions as necessary to make any delay. Note that the processor is wholly tied up making the delay so it cannot do other things while waiting. If interupts occur, the delay might be longer because of the extra instructions it has to execute.
2. a built-in timer if there is one. This is accurate, especially if you use an interrupt to signal the end of the delay. It leaves the processor free to do other things and works like an alarm clock. After being started it sits in the background then alerts you when time is up.
3. use an external timing reference, this might be a counter circuit or an RTC. Bear in mind that any external timing system will have to be periodically checked by the program so even if the delay itself is accurate, there may be an extra delay before it gets noticed.
All of these methods rely on the clock source being accurate of course but normally it would be. I'm not sure what method mikroC uses but it should be accurate to within 1% of the requested time.
Brian.