- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to be able to enter a loop and have the loop wait for a specified time (say 0.1 sec) between iterations. I presume this involves the function SignalObjectAndWait. The online help gives me a plethora of confusing information, but what I really need is one small example. Please could someone show me that way.
With many thanks in advance
Mike
With many thanks in advance
Mike
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You probably need plain Sleep (there are actually 3 versions, one from DFWIN, one from DFPORT, and SLEEPQQ from DFLIB, with slightly different semantics). SignalObjectAndWait, WaitForSingleObject & similar are used for inter-thread and inter-process synchronization.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RECURSIVE SUBROUTINE delay_ms (howmany)
USE kernel32
IMPLICIT NONE
INTEGER,INTENT(IN):: howmany
!Win32 suspend function, allows the timeslice to be
!used by other threads until the timeout elapses
IF (howmany > 0) CALL sleep (howmany)
END SUBROUTINE delay_ms
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page