Re: [q-lang-users] Q 7.11 on Mac OS X
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-03-06 16:02:52
|
John Cowan wrote: > I've attached a trivial implementation of clock_gettime that I found in > OpenBSM; it may be useful. Thanks a bunch. clock_nanosleep shouldn't be much harder. I'll add those emulations in the next release. I'll have to think what to do about clock_getres, though, just assuming 1000 there probably won't be that useful, do you maybe have some code for that, too? For the time being, the following Q definitions should also do the trick (minus the error checking, and it also adds some latency so nanosleep_until won't be very accurate): import system; nanotime _ = round (time*1e9); nanosleep _ T = sleep (T*1e-9); nanosleep_until _ T = sleep (T*1e-9-time); Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |