If I go to the menus: Help > Studio > Qt Demos... and select the timer
demo, it displays this text for me:

----------------------------------------------------
There are 2 timers - the system timer, and the form timer.

There is only one system timer, while any number of form may have timers.

Examples:

1. system timer, calls sys_timer_z_

start, e.g. every two seconds:
   timer_qtdemo_ 2000

stop:
   timer_qtdemo_ 0

2. qtdemo form timer, calls qtdemo_timer
(qtdemo form should be active)

start, e.g. every 2 1/2 seconds:
   wd 'ptimer 2500'

stop:
   wd 'ptimer 0'
----------------------------------------------------

If I then examine the definition of timer_qtdemo_, I see this definition:

3 : 0
if. y do.
  sys_timer_z_=: 3 : 'smoutput ''systimer: '',":6!:0$0'
  wd 'timer ',":y
else.
  wd 'timer 0'
  sys_timer_z_=: ]
end.
EMPTY
)

There does not seem to be a timer demo for JHS, and so presumably this
approach will not work for JHS (nor jconsole), at least not in current
versions of J. In JHS, there's no (wd).

For jconsole (and JHS), you would probably need to use an OS-specific
timer implementation.

What kind of environment are you working in?

Thanks,

-- 
Raul

On Thu, Sep 10, 2015 at 9:30 AM, yves.tanguy <[email protected]> wrote:
> Hello All,
> i find this in the J manuals :
> timer i ; set interval timer to i milliseconds. Event systimer occurs when
> time has elapsed. The timer keeps triggering events until the timer is
> turned off. An argument of 0 turns the timer off. The systimer event may be
> delayed if J is busy, and it is possible for several delayed events to be
> reported as a single event.
>
> how can i do a very simple timer ?
>
> Regards,
> Yves
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to