Solved

Creating a ‘delay’ routine.

Posted on 1997-10-31
1
727 Views
Last Modified: 2008-02-26
I am designing a test system user interface for Win 95 using Microsoft Visual C++ 5.0.  One system requirement is a routine that delays a variable amount of time then returns to the calling test routine.  The test system will be waiting for this routine to return before proceeding.  Is there a MFC library class that I can use to implement this routine?  What are the other possible implementations?
0
Comment
Question by:chele
1 Comment
 
LVL 4

Accepted Solution

by:
md041797 earned 100 total points
Comment Utility
int delay = random (MAX_DELAY_SECONDS);  // you define it.
sleep (delay);



0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now