I would be careful of believing NAP :) The sleeping is, I believe, based entirely on the time slicing and clock interrupting ability, and so dependent on that mechanism internally of the underlying O/S.
I have found, on various implementations, that NAP doesn't actually support any possible delay, but only quantized results. Try looping for 1000 iterations on NAP 1 and then spewing TIME() and you'll see. -----Original Message----- From: Doug Farmer <dfar...@epicor.com> To: 'U2 Users List' <u2-users@listserver.u2ug.org> Sent: Thu, Dec 27, 2012 2:47 pm Subject: Re: [U2] Sleeping in Basic Thanks for this tip on NAP, The documentation does say it sleeps for milliseconds. I tried it and it works. RQM for UniData says it does the same as sleep. Well 1/2 of the problem solved! Still looking or a UniData answer. Doug Farmer 952-417-5225 -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Whitehorn Sent: Thursday, December 27, 2012 4:12 PM To: U2 Users List Subject: Re: [U2] Sleeping in Basic If my memory serves correct, I believe on UniData it's RQM . -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Don Robinson Sent: Friday, 28 December 2012 9:07 AM To: U2 Users List Subject: Re: [U2] Sleeping in Basic Doug, If Universe, look at NAP, it does milliseconds. Can't remember what it is in Unidata, maybe SLEEPM? Don From: Doug Farmer <dfar...@epicor.com> To: 'U2 Users List' <u2-users@listserver.u2ug.org> Sent: Thursday, December 27, 2012 4:56 PM Subject: [U2] Sleeping in Basic Happy holidays all, I just want to make sure I did not miss something over the U2 releases. Since the Microdata Reality days, I have used "SLEEP nn" to sleep for nn seconds. Simple, usually does the trick. But in today's gotta have it now, I won't wait, environment, a second is sometimes way too long. Is there anything I missed over the last few years to sleep for less than a second? I am executing a phantom command from a UniObjects subroutine call and waiting for it to finish. I am using a phantom, just in case the program aborts or hangs. I am not in control of what code is being run, it could try to read or write to an unopened file for example. If the program does hang, I get the dreaded "Error 30102" message (not helpful at all). In most cases, the program reads the data it needs and finishes in less than a second. The UniObjects subroutine then writes a flag I can pick up to see that the data is ready to return to the UniObjects client. I don't want the subroutine constantly looping and reading for the flag. This would take a lot of the CPU cycles. But, I don't want to wait up to a second to see that the phantom has completed. Any ideas would be helpful. This needs to run on both UniData and UniVerse. Have a great New Year. One more year older for us "experienced" developers in the PICK community. (circa 1978) Doug Farmer This message has been scanned for malware by Websense. http://www.websense.com/ _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users Click https://www.mailcontrol.com/sr/Tv+r55u8HfPGX2PQPOmvUhQdr9UqjTk1M2f99tr8WdvOye2VhyKlGIdl6QC!L7u!0ZOMv8J8HrOrbIY9K1KtKg== to report this email as spam. _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users