Re: gtk-timer
- From: Bruce Ide <bruce ide echostar com>
- To: Nick Soffe <soffe bioch ox ac uk>
- Cc: GTK-list redhat com
- Subject: Re: gtk-timer
- Date: Thu, 03 Aug 2000 16:24:53 -0600
Nick Soffe wrote:
>
> Hi,
> I am a total newcomer to GTK /GDK programming and this is probably a stupid
> question! I have written a simple graphics program to draw a single line scan on
> the screen (a simulated oscilloscope display) and am using the gtk-timeout-add
> function to update the scan at regular intervals. For times in excess of about
> 30ms per point this works fine. Below this number reducing the time interval has
> no effect on the update time until I enter the minimum 1ms at which point the
> scan is drawn quickly. The function being called is very short so the update
> time should be no problem. The behavior is also exactly the same on a much
> faster computer. Because of my lack of experience with these functions I`m sure
> the problem is of my making and don't want to waste your time but can you just
> confirm that there is nothing strange about this function at short time
> intervals?
> I am using GTK version 1.2.6-7 shipped with Red Hat linux 6.2. The compiler has
> no apparent complaints.
> Thanks,
> Nick Soffe. (Oxford Uni.)
Once you get down to that granularity, you have to start worrying about
how long a kernel timeslice is. I suspect it's not the speed of the
computer but rather a set time for a timeslice given to you by the
kernel. You might get better results using a real time kernel and API. I
don't recall how long a timeslice is in Linux but I seem to recall that
the magic number in OS/2 was about 30 ms (For whatever that's worth.)
--
Bruce Ide
bruce.ide@echostar.com
"GP: Is Eris True?" "M2: Everything is true." "GP: Even false things?"
"M2: Even false things are true." "GP: How can that be?" "M2: I don't
know, man. I didn't do it."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]