[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Re: time on Mac
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Re: time on Mac |
Date: |
07 Sep 2004 12:20:11 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings, and thanks again, Aurelien!
Actually, get-internal-run-time is a wrapper around *times*, not time,
which has the advantage of separating out user, system, and child
times. I think this is important, especially as running gcc in gcl
can be such a significant portion of actual time in many
circumstances. Such a separation is not possible, with gettimeofday,
right? If not, I'd suggest we just get the HZ conversion right,
otherwise I have no problem with synchronizing on gettimeofday.
Take care,
Aurelien Chanudet <address@hidden> writes:
> Hi,
>
> The odd results you're reporting about are due to an
> inconsistency between time(3) and gettimeofday(2) :
> get-internal-real-time is a wrapper around
> gettimeofday(2) while get-internal-run-time is a
> wrapper around time(3).
>
> gcl relies on the number of clock ticks per second
> (see comment at the beginning of o/unixtime.c) : the
> conversion factor HZ is expected to be defined
> somewhere in <sys/param.h>. If no conversion factor is
> present, a default conversion factor of 60 is assumed.
>
> On MacOS X, there's no no conversion factorin
> <sys/param.h>. As a result, a probably wrong
> conversion factor is assumed, thus leading to odd
> results.
>
> My advice is that time(3) should be changed in favor
> of gettimeofday(3). Camm what do you think ?
>
> Aurelien
>
> > Greetings!
> >
> > o/unixtime.c. Time macro in lsp/gcl_mislib.lsp.
> >
> > Please let me know if you need further explanation.
> > And thanks for
> > looking into this!
> >
> > Take care,
> >
> >
> > Aurelien Chanudet <address@hidden> writes:
> >
> > > Hi Bob and Warrem,
> > >
> > > > > It seems that there is something odd about the
> > > > time function on the Macintosh
> > > > > version of GCL (version 2.6.4). In the
> > following
> > > > example, the sum of run-gbc
> > > > > and gbc time is about 60% greater than the
> > real
> > > > time. In fact, gbc time is
> > > > > even greater than real time!
> > >
> > > Camm, can you please point me to the underlying C
> > > source file which is responsible for calling Unix
> > time
> > > management functions (I suppose this is what
> > happens)
> > > ?
> > >
> > > > > (time (loop for i from 1 to 10 do
> > (make-list
> > > > 1000000)))
> > > > >
> > > > > real time : 2.667 secs
> > > > > run-gbc time : 1.100 secs
> > > > > child run time : 0.000 secs
> > > > > gbc time : 3.117 secs
> > > > >
> > > > > We have also seen other strange results such
> > as
> > > > the following, which have
> > > > > run-gbc time way greater than real time, which
> > > > seems impossible.
> > > > >
> > > > > All Nqthm-1992 tests completed
> > successfully.
> > > > >
> > > > > real time : 1360.783 secs
> > > > > run-gbc time : 1776.283 secs
> > > > > child run time : 221.300 secs
> > > > > gbc time : 46.750 secs
> > > > >
> > > > > Warren and Bob
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Camm Maguire address@hidden
> > > >
> > >
> >
> ==========================================================================
> > > > "The earth is but one country, and mankind its
> > > > citizens." -- Baha'u'llah
> > > >
> > >
> > >
> > >
> > >
> > >
> > > Le nouveau Yahoo! Messenger est arrivé ! Découvrez
> > toutes les nouveautés pour dialoguer instantanément
> > avec vos amis. A télécharger gratuitement sur
> > http://fr.messenger.yahoo.com
> > >
> > >
> > >
> >
> > --
> > Camm Maguire address@hidden
> >
> ==========================================================================
> > "The earth is but one country, and mankind its
> > citizens." -- Baha'u'llah
> >
>
>
>
>
>
> Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour
> dialoguer instantanément avec vos amis. A télécharger gratuitement sur
> http://fr.messenger.yahoo.com
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah