gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: time on Mac


From: Aurelien Chanudet
Subject: [Gcl-devel] Re: time on Mac
Date: Mon, 6 Sep 2004 11:06:35 +0200 (CEST)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]