Re: XForms: Fast timer?

T.C. Zhao (tc_zhao@yahoo.com)
Sat, 2 Oct 1999 08:38:31 -0700 (PDT)

# To subscribers of the xforms list from "T.C. Zhao" <tc_zhao@yahoo.com> :

10Hz is about 0.1s. You should be able to get
fairly accurate updates on most systems if
you use setitimer() and signal(). Also timeout
in xforms may be a little more accurate than
timer.There is one function you can tweak
(fl_set_idle_delta()) to get more accurate
timing in xforms. Of course anything less
than 20ms probably is not realistic to expect.

--- Hugh Gibson <hugh@mrao.cam.ac.uk> wrote:
> # To subscribers of the xforms list from Hugh Gibson
> <hugh@mrao.cam.ac.uk> :
>
> Hi,
> I am using the timer object 'fl_set_timer' to generate
> regular updates (10Hz). There seem to be large latencies in XForms
> which means it is hard to go faster than this, which is a
> shame. I don't want to use the idle callback, as I want a defined
> time
> between calls.
> I am also stuck with the unix usleep(x) which is supposed to
> sleep for x ammount of microseconds. In reality, you will be lucky
> to
> get better than 10ms.
>
> I'm using Linux Slackware 2.0.34 with XForms V0.88.1 and Fdesign
> 0.53
>
> Any advice would be useful.
>
>
> p.s. Here is my Makefile (for those who were having fun with
> modifying the complex DEMO one) (I did!)
>
> ----------------------- snip ---------------------
>
> CANDIR=/usr/local/can4linux/Can
> LIBS =-L/usr/X11R6/lib -L$(CANDIR)/lib -lCan -lforms -lX11 -lm
> CFLAGS = -I$(CANDIR)/include -O3 -Wall
>
>
> # N.B. we are using fdesign with -I myheader.h which
> # points harp_coila.c include file to myheader.h, which includes
> # both forms.h and myglobals.h files automatically, so we can
> # make changes with fdesign without having to make tweaks.
> # modified_main.c is harp_coila_main.c but with extra start-up
> # bits
> # modified_cb.c is harp_coila_cb.c template file, with the
> # callbacks filled in.
>
> OBJS = harp_coila.o modified_main.o modified_cb.o can.o
>
> harp_coila: $(OBJS)
> $(CC) $(CFLAGS) -o harp_coila $(OBJS) $(LIBS)
>
> clean:
> -rm harp_coila *.o ; make
>
>
>
>
>
>
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
>
>

=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/