wakres01@pa.usl.edu (1712 Stelly John B) (05/30/90)
I don't want to sound like, an idiot, but I've never messed with INTUITICKS timing before, and I'm trying to wait an arbitrary amount of time based on an INTUITICKS message received by my window. At any rate, I've declared, and opened a window like this: struct NewWindow NewW = {0,0,320,200,1,2, MOUSEBUTTONS | CLOSEWINDOW | RAWKEY | INTUITICKS, WINDOWCLOSE, etc. Notice the INTUITICKS flag is set. So, I get my message from my message port, expecting to count these INTUITICKS events (10 per second right?) and get a rough estimate of how much time has passed, right ? WRONG. The INTUITICKS messages come continuously, all with the same class and code. So, Instead of counting tenths of a second, I am counting iterations of my loop Can anyone help, what am I overlooking ? John B Stelly III wakres01@pa.usl.edu
phi@goanna.cs.rmit.oz.au (Philip Hingston) (05/30/90)
wakres01@pa.usl.edu (1712 Stelly John B) writes: >I don't want to sound like, an idiot, but I've never messed with INTUITICKS >timing before, and I'm trying to wait an arbitrary amount of time based on >an INTUITICKS message received by my window. At any rate, I've declared, and >opened a window like this: > [description deleted] Are you ReplyMsg'ing them? I think that only one INTUITICK at a time is generated and another will not occur until 1/50th of a second after you call ReplyMsg. phi P.S. My news poster won't let me post unless I include more new text than text from the original message. So I might as well use this space to ask for people interested in beta-testing a pd Logo interpreter that is nearing completion. It is written in C, slower than the Commodore one, will have more Amiga features than the Commodore one (AREXX, load/save IFF etc). -- Philip Hingston, Computer Science,ACSnet: phi@goanna.cs.rmit.oz R.M.I.T. ARPA: phi%goanna.cs.rmit.oz.au@uunet.uu.net GPO BOX 2476 V, CSNET: phi%goanna.cs.rmit.oz.au@australia Melbourne, 3001, AUSTRALIA UUCP: ...!uunet!goanna.cs.rmit.oz.au!phi
cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) (05/31/90)
In article <9151@rouge.usl.edu> wakres01@pa.usl.edu (1712 Stelly John B) writes: >I don't want to sound like, an idiot, but I've never messed with INTUITICKS >timing before, and I'm trying to wait an arbitrary amount of time based on >an INTUITICKS message received by my window. At any rate, I've declared, and >opened a window like this: Intuiticks are useful as a "kicker" for a program that doesn't want to be MT unfriendly. Basically they will kick you every so often (approx 10 times a second) to pop you out of the Wait() that you are in so that you can update counters, refresh things, check for various conditions that would not result in a signal. They are lousy for timing things since they don't "stack" (on purpose). That means that if you get an IntuiTick, after .1 seconds another one will be queued for your message port but after .2 seconds another one will _not_ be queued if the previous one is still in your message port queue. This is good because it prevents unconstrained consumption of memory resources. If you want to keep track of the amount of time that has passed, you can cache the Seconds, and Micros value from the IntuiMessages you see and compare that to the current time of day. This lets you know how "stale" an Intuimessage is and if you are in a real time situation you can decide to ignore messages that happened a while ago. -- --Chuck McManis Sun Microsystems uucp: {anywhere}!sun!cmcmanis BIX: <none> Internet: cmcmanis@Eng.Sun.COM These opinions are my own and no one elses, but you knew that didn't you. "I tell you this parrot is bleeding deceased!"
wihae@whmod.UUCP (Wilfried Haering) (05/31/90)
>opened a window like this: > >struct NewWindow NewW = {0,0,320,200,1,2, > MOUSEBUTTONS | CLOSEWINDOW | RAWKEY | INTUITICKS, > WINDOWCLOSE, >etc. > >Notice the INTUITICKS flag is set. >So, I get my message from my message port, expecting to count these INTUITICKS >events (10 per second right?) and get a rough estimate of how much time has >passed, right ? WRONG. >[...] >John B Stelly III >wakres01@pa.usl.edu - You will get approximately(!!) ten Intuitics a second. - You have to reply to every(!!) Intuitic-Message you receive, otherwise Intuition stops to send another Intuitic. - See RKM Includes & Autodocs (blue edition) page A-150. -- Best reguards, Wilfried Wilfried Haering, Bierstadter Hoehe 66, D6200 Wiesbaden, West-Germany ...!{cbmvax|nccnet}!cbmehq!cbmger!whmod!wihae
mwm@raven.pa.dec.com (Mike (Real Amigas have keyboard garages) Meyer) (06/05/90)
In article <136398@sun.Eng.Sun.COM> cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) writes:
Intuiticks are useful as a "kicker" for a program that doesn't want to
be MT unfriendly.
Chuck missed my favorite use for INTUITICKS: as a timer for a
"waiting" indicator when the program is waiting for you to do
something. For example, The Art Of Go blinks (if enabled) the last
stone it played while waiting for you to make a play, and uses
intuiticks as a timer for that. It's crude, the timing is incredibly
innaccurate, but it's good enough for this and I don't chew up more
resources just for an accurate timer I don't need.
<mike
--
Love and affection, Mike Meyer
Of the corporate kind. mwm@relay.pa.dec.com
It's just belly to belly, decwrl!mwm
Never eye to eye.