Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

delay in less than mili second

Status
Not open for further replies.

comsians

Member level 1
Member level 1
Joined
May 22, 2005
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,755
Plz tell me
how to implement a delay of less than 1 milli second in C language

as c built in function delay(x) where x is in mili second


i want to dealy a program in nanosecond

reply me as soon as possible
 

I which OS?

Most of PC have hardware high-resolution performance counter.
In windows OS you can access to counter with 2 API functions:

BOOL QueryPerformanceCounter(
LARGE_INTEGER *lpPerformanceCount // address of current counter value
);

BOOL QueryPerformanceFrequency(
LARGE_INTEGER *lpFrequency // address of current frequency
);

With this 2 functions you can do precision delay.
 

JankoMuzyk said:
I which OS?

Most of PC have hardware high-resolution performance counter.
In windows OS you can access to counter with 2 API functions:

BOOL QueryPerformanceCounter(
LARGE_INTEGER *lpPerformanceCount // address of current counter value
);

BOOL QueryPerformanceFrequency(
LARGE_INTEGER *lpFrequency // address of current frequency
);

With this 2 functions you can do precision delay.

This function do not get precizion delay (!!!). but only precizion tick count of fast clock. You can write delay function by self, but this not guaranties,
that windows do not grab CPU tyme for system neads up to 10 ms .....
Only way you can set "realtime priority" for your task, but stability of windows not garanted ...

In real world, forget using windows for sub miliseconds delays, only it is possible by low level kernal driver, that working from interrupts.
 

Plz tell me
How can i get delay of less than 1 milli second in C language in Microsoft Windows 98

as c built in function delay(x) where x is in mili second


i want to dealy a program in nanosecond

reply me as soon as possible
 

shimlian said:
Plz tell me
How can i get delay of less than 1 milli second in C language in Microsoft Windows 98

as c built in function delay(x) where x is in mili second


i want to dealy a program in nanosecond

reply me as soon as possible

Forgot getting small and stable delays in windows !!!
Read my previous answer .....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top