On 7/18/06, seventh guardian <[EMAIL PROTECTED]> wrote:
On 7/18/06, Yuri Arapov <[EMAIL PROTECTED]> wrote:
> Hi list!
>
> I started experimenting with FvwmScript and ran into this weird
> thing: output of date command called every second in
> PeriodicTasks section of the script skips ever second
> second. So I see
> Tue Jul 18 19:45:03 MSD 2006
> Tue Jul 18 19:45:05 MSD 2006
> Tue Jul 18 19:45:07 MSD 2006
> etc.
> instead of
> Tue Jul 18 19:45:03 MSD 2006
> Tue Jul 18 19:45:04 MSD 2006
> Tue Jul 18 19:45:05 MSD 2006
> etc.
>
> Just to compare: the following one-liner works fine in xterm:
> while date; do sleep 1; done
>
> Script that reproduces this effect is attached. To play with
> it start fvwm console and type
> Module FvwmScript /full/name/of/the/script <Enter>
>
> I tried this script on 2 different boxes, same results.
>
> My distro is current Debian unstable.
> Fvwm version is 2.5.16.
>
> Any clue where to search for the fix?
>
It is possible that the script takes more than 1 second to run. Give
it a 2 or 5 second interval and see if the problem persists.
Try this for the periodic task:
PeriodicTasks
Begin
Do {Echo periodic task}
If (RemainderOfDiv (GetTime) 3)==0 Then
ChangeTitle 1 (GetOutput {date} 1 -1)
End
It works perfectly (3 secs interval). If you change the 3 to 2 it
works perfectly, but in a 2 second interval. Changing to 1 doesn't
work, because the script takes more than 1 second to run.
The problem is probably in using GetOutput, because it takes some time
to launch the "date" program.. Expect something like this (or worst)
whenever you use GetOutput.
Cheers,
Renato
Cheers,
Renato
> Best regards,
>
> Yuri
>
> --
> Yuri Arapov <[EMAIL PROTECTED]>
>
>
>