comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Delay while wait for a command
Date: Tue, 29 Sep 2009 14:46:19 +0200
Date: 2009-09-29T14:46:19+02:00	[thread overview]
Message-ID: <1rot84c6nrutr.1r2ehrck4wen4.dlg@40tude.net> (raw)
In-Reply-To: 287e1264-70c7-4cbb-8ee6-a63d2980071e@o10g2000yqa.googlegroups.com

On Tue, 29 Sep 2009 05:13:52 -0700 (PDT), Pablo wrote:

> I need to find a way to count an event occurrence in a defined time
> interval. That is, for instance, I need to wait 5 seconds, and in
> meantime I need to count the number of occurrences of a method (which
> could be a mouse click). Could someone help me? Thanks.

Hmm, that depends on what is "event", "count" and "wait".

Obviously you can:

   Done_At := Clock + 5.0;
   ...
     -- Upon an event
   if Clock < Done_At then
      Count := Count + 1;
   end if;

Who waits for 5s? Is it a task? Is it blocked? Is the event signaled to
this task? Another task? And so on, including a specification of what is
the GUI library used, Win32 API, Gtk etc.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-09-29 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 12:13 Delay while wait for a command Pablo
2009-09-29 12:46 ` Dmitry A. Kazakov [this message]
2009-10-01 14:31   ` Pablo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox