comp.lang.ada
 help / color / mirror / Atom feed
From: Pablo <pablittto@gmail.com>
Subject: Re: Delay while wait for a command
Date: Thu, 1 Oct 2009 07:31:48 -0700 (PDT)
Date: 2009-10-01T07:31:48-07:00	[thread overview]
Message-ID: <dbc7ad2d-d10e-4d79-a6d3-00629c89d863@f16g2000yqm.googlegroups.com> (raw)
In-Reply-To: 1rot84c6nrutr.1r2ehrck4wen4.dlg@40tude.net

On 29 set, 09:46, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> 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. Kazakovhttp://www.dmitry-kazakov.de

Thanks Dmitry, I already solved it.



      reply	other threads:[~2009-10-01 14:31 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
2009-10-01 14:31   ` Pablo [this message]
replies disabled

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