lucifer wrote:
Provide context otherwise we don't know why you are posting this. Only
yesterday and the day before that and the day before that (and probably
today as well) instructions were posted together with the reason why you
need to provide context.
I believe you can either hit the preview button before writing your
reply or instead of using the reply button beneath the message you the
options button above to reveal a reply button that works properly.
Most of us do *not* use Google because it is a horrible interface. There
is no guarantee we have received the message you are replying to or, if
we have, that we have not forgotten what it said and have no convenient
way to view it.
actually i am transmitting data over wireless medium so i have to
control the data ie slow it down thats i have to get a delay in the
transmitting function inversely to the speed of the the processor the
code i have been using is
void delay(int n)
{
clock_t start = clock();
while( ( ( (clock()-start)/CLOCKS_PER_SEC )*1000 )<n) ;
}
the n is calculated frm another function
Good for you. Of course, if clock_t is an integral type and
CLOCKS_PER_SEC is integral (which it will be if clock_t is) then it
might not do quite what you want because it will throw away the
remainder of the division.
Also clock() returns processor time, *not* wall clock time, and in many
environments depending on loading this can be vastly different.
You don't check whether your call to clock() succeeds, it returns
(clock_t)-1 if it fails.
There is no guarantee as to the precision or accuracy of clock().
<OT>
If this is on a multi-tasking system you are burning processing cycles.
</OT>
For a better solution ask in groups dedicated to your system (or systems
of interest) since there is no good portable solution.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.