Re: How to produce a fast clock output?
From: Amundsen Zhuang (a_roald_at_hotmail.com)
Date: 08/08/03
- Next message: Brian C: "Re: select() max number of file descriptors"
- Previous message: John Galt: "Re: select() timeouts even if there are pending connections"
- In reply to: Fletcher Glenn: "Re: How to produce a fast clock output?"
- Next in thread: Jem Berkes: "Re: How to produce a fast clock output?"
- Reply: Jem Berkes: "Re: How to produce a fast clock output?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 7 Aug 2003 18:21:10 -0700
Fletcher Glenn <f-g-l-e-n-n@quest.com> wrote in message news:<3F2FCBC9.3A924278@quest.com>...
> Amundsen Zhuang wrote:
> >
> > I want to produce a clock output on the pin of parallel port. I used
> > SIGALRM to implement it, and I only got a clock output with
> > 20ms-cycle.
> >
> > How could I produce a clock output that's cycle is 20us?
>
> You can't, unless you can gain exclusive use of the CPU. If you
> did this, the system would no longer work. All UNIX tasks are
> subject to time-slicing, meaning that you can only use so much
> time before the system cuts over to another task. During the time
> that the system is processing these other tasks, your task is
> suspended.
OK. I needn't keep the clock running continuous. I only want the clock
running in the time-slice. The clock can be interrupted.
So, how can I get such a fast clock? By the way, I have to implement
it on parallel port. I can't use other hardware resource.
Thanks a lot.
- Next message: Brian C: "Re: select() max number of file descriptors"
- Previous message: John Galt: "Re: select() timeouts even if there are pending connections"
- In reply to: Fletcher Glenn: "Re: How to produce a fast clock output?"
- Next in thread: Jem Berkes: "Re: How to produce a fast clock output?"
- Reply: Jem Berkes: "Re: How to produce a fast clock output?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|