Re: XForms: Fast timer?

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 1 Oct 99 07:08:10 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> 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.

You're limited by the resolution of the system's timer and this is
platform dependent. On most platforms, it's about 10 milliseconds.

BTW, use of usleep() is deprecated and is not available under all
flavors of Unix. setitimer() is the preferred function call.

However, I don't think it has any better real-world resolution.

spl
_________________________________________________
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/