poll((struct pollfd *)NULL,0,5);
if we want to sleep for five seconds. Is the above statement valid ? Is
it fullfills the objective.
Mukesh.
No, this statement is not valid as 5 ms != 5 sec.
You may look at alternative, like /usleep()/ or /nanosleep()/ if your
system has those functions.
Cheers,
Loic.
>poll((struct pollfd *)NULL,0,5);
But poll sleeps milliseconds, not seconds.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
> you know that poll takes third argument i.e time to sleep in milli
> seconds. are u agree ?
absolutely. That's why you wouldn't wait 5 seconds as mentionned in
your first post but 5 ms... But perhaps you meant the later!
In all cases, check out for the availability of /usleep()/ or
/nanosleep()/.
Cheers,
Loic.