Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2005

Tip: Looking for answers? Try searching our database.

Time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gabi - 20 Jun 2005 09:47 GMT
Hi All,
is any one can give me some hint how can i create
a mechanism that support time out.
for example:
i have a job that running and i want to check if this job exceed its time
limit.

what functions can i use??
and if any one has some sample ill appriciate it.

Thanks
Rodrigo Corral [MVP] - 20 Jun 2005 14:49 GMT
Do the work in a thread, use WaitForSingleObject for waiting.

Signature

Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org

Gabi - 21 Jun 2005 04:48 GMT
Hi Rodrigo

yes i know that but i meant somthing else.
mu problem is :
im doing two threads.
but if im doing it with sleep() function it take allot of resources,
and the entire application slow down.

maybe you have an idea how it possible to solve without the sleep().
Thanks

> Do the work in a thread, use WaitForSingleObject for waiting.
Rodrigo Corral [MVP] - 21 Jun 2005 09:00 GMT
Using WaitForSingleObject function you can specify how much time you want to
wait.

Signature

Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org

Gabi - 21 Jun 2005 09:48 GMT
Hi Rodrigo,
yes that was my problem because i put on
waitforsingleobject(xx,0) time=0
in do while loop
so all the time the program was busy.
after put a normal time like 10msec it released and evrything works nice.

Thanks

> Using WaitForSingleObject function you can specify how much time you want to
> wait.
Rodrigo Corral [MVP] - 21 Jun 2005 13:12 GMT
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q224318

Signature

Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.