delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/12/07:00:46

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: atlas_wang AT yahoo DOT com (Wang Yong)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Thread Swithing Time in pth1.3.7?
Date: 12 Feb 2004 03:45:17 -0800
Organization: http://groups.google.com
Lines: 28
Message-ID: <78a4a70a.0402120345.747e09e2@posting.google.com>
References: <78a4a70a DOT 0402111922 DOT 59344047 AT posting DOT google DOT com> <027m20lhm9cj73mnuuub6jkmk0bqlveuvu AT 4ax DOT com>
NNTP-Posting-Host: 202.172.41.100
X-Trace: posting.google.com 1076586317 29895 127.0.0.1 (12 Feb 2004 11:45:17 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Thu, 12 Feb 2004 11:45:17 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Andrew Cottrell <andspam at swiftdsl dot com dot au> wrote in message news:<027m20lhm9cj73mnuuub6jkmk0bqlveuvu AT 4ax DOT com>...
> >I use osilliscope to measure the signal from parallel port and find
> >that that the the time beteen rising edges is around 760 microseconds!
> >To be honest, it is too large to use in a time-critical environment.
> 
> This is a very good result. Have a look at the parallel port spec and
> the access times for the interface and you will find that the timing
> is all to do with the access time of the ic.
> 
> A better way is to use the PC timer tick and count the number of
> itteractions per tick and then divide the numbers to get the time and
> make sure you do this for a number of seconds to give a better
> average.
>  
Well, the access time to parallel port is too small to be ingored. I
tried an internal multitasking library of our company for WATCOM C,
and the task-switching time is about 2 microseconds (use parallel port
to generate signal, too). But the kernel of that library is written in
assembly and difficult to port into DJGPP.

> And do NOT run the test under Windows as Windows steals time and CPU
> resources even if you are running in full screen.
> 
As I mentioned in my previous post, I carried out the test under
MS-DOS 6.22.

> 
> Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019