Hi there im wondering how to use a time delay in my code. What i have done is searched through a saved file and picked out infomation the send it to the rs232 port. what i want to do is create a time delay of 100 micro seconds for every 18 charecters sent. Heres my code so far.
ontrix
0
Newbie Poster
Recommended Answers
Jump to PostWell you could state your OS and compiler.
There is no standard way to achieve sub-second delays.
Jump to PostIm using windows xp home and visual C++
Your compiler's documentation is the best place to look for compiler-specific functions. It takes me forever to attempt to navigate the MSDN, so here's a start.
Jump to Posthint: look for function Sleep() which uses milliseconds. And 100 is about as accurate as it can get, depending on what other processes are running on the computer.
All 10 Replies
Salem
5,138
Posting Sage
ontrix
0
Newbie Poster
Dave Sinkula
2,398
long time no c
Team Colleague
ontrix
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
ontrix
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Salem
5,138
Posting Sage
slippygod
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.