Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Sleep Routine

reneeculver
Beginner
4,537 Views
I need a Sleep function.

It should have one Argument which is the number of seconds to sleep for. Any maximum in seconds is not important as long as the maximum is greater is greater than 60 seconds.

It shoulld be simple...

I wish I had some documentation. Can anyone recommend a good reference book?

Renee
0 Kudos
22 Replies
Steven_L_Intel1
Employee
408 Views
It all depends on what you want to do. All major operating systems have the capability of waiting for some asynchronous event. VMS users wanted a simple application-level sleep capability, and LIB$SLEEP gave it to them. While my initial implementation was with $HIBER and $SCHDWK, that didn't work well for applications that had their own wakeups, so it was changed to use something different (I forget exactly whiat.)

I recall having the hardest time getting agreement from all the various language teams as to what the argument data type should be. I wanted floating point, but the RPG II people complained they didn't have it, so integer milliseconds it how it ended up.

I would say that SLEEPQQ satisfiies the needs of more than 95% of Fortran application programmers. Since I know you're tweaking the ADVENTURE game program, I think you're making it much more complex than it needs to be.
0 Kudos
reneeculver
Beginner
408 Views
I don't think so. I receive a stack dump any time I shut down execpt when I use "quit". I'd like for shuting down, to be clean. I don't think that's asking too much or making it too complicated. There are no buttons on the Windows Frame.

"that didn't work well for applications that had their own wakeups,"

That's because by definition, tasks or processes with their own wakeup are asynchronous and will not mix well with synchronous tasks or processes.

Renee
0 Kudos
Reply