[Gambas-user] Count the real time spent editing the data

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Mar 10 23:09:10 CET 2021


Quickly thinking... Start timer in key event and stop it when x seconds
have passed without activity.
Something like this:

This in some key event:

If fActivityStarted = -1 Then
fActivityStarted = Timer
ActivityTimer.Start
Endif

And this for the started timer:

Public Sub ActivityTimer_Timer() ''No activity for x seconds
fTotalTime += Timer - fActivityStarted
fActivityStarted = -1
ActivityTimer.Enabled = False
End


Jussi

On Wed, Mar 10, 2021 at 11:38 PM Martin <mbelmonte at belmotek.net> wrote:

> Is there any way to know if a gambas program had keyboard activity from
> when it was opened until it was closed?
> It is to count the real time spent editing the data.
>
> Regards.
>
> Martín.
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210311/2074c72a/attachment.htm>


More information about the User mailing list