Introducing Delay less then a second.

Hi,

I have a doubt in introducing a delay in the programs.
We know that we do have a sleep() function/api using which
we can bring a delay in terms of seconds.
A minimum delay can be atleast 1 second.

Now I'm bothered about how to introduce a delay that is just
less than a second. Like some amount of milli or microsecond delay.

Drivers that are associated with physical devices some time
requires to have a delay of some microsceonds for getting a
result of a query that has been submitted to the device.

So, how to introduce this microsecond delay. Probably like
we might requre some microseconds as the poling interval.

So, how to achieve this.

Let me know your ideas.

Regards

Vishwa.

shell% man nanosleep
shell% man select

=)

Hi

Thanks for both Rusell & Drivers.
This was just great for me.

Well then how different are the alarm() & ualarm().
Can we use them also. I'm bit puzzled with them.

Again Thanks for all your quick responses.

Regards

Vishwa.