pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.470 2003/02/08 18:07:07 grubba Exp $ + || $Id: builtin_functions.c,v 1.471 2003/02/08 18:37:54 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.470 2003/02/08 18:07:07 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.471 2003/02/08 18:37:54 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:5989:       /* Don't subtract the gc time at all if we don't know whether it's    * thread local or not, since if we do it wrong we might end up    * returning a negative number. */   #if CPU_TIME_IS_THREAD_LOCAL == YES    time -= OBJ2THREAD(Pike_interpreter.thread_id)->auto_gc_time;   #elif CPU_TIME_IS_THREAD_LOCAL == NO    time -= auto_gc_time;   #endif    -  nsec = args && !UNSAFE_IS_ZERO(sp-args); +  nsec = args && !UNSAFE_IS_ZERO(Pike_sp-args);       pop_n_elems(args);    if (nsec)    push_int64(time);    else    push_int64(time/1000);   }      /*! @decl int gethrtime (void|int nsec)    *!
pike.git/src/builtin_functions.c:6015:    *! The actual accuracy on many systems is significantly less than    *! milliseconds or nanoseconds.    *!    *! @seealso    *! @[time()], @[System.gettimeofday()], @[gethrvtime()]    */   #ifdef HAVE_GETHRTIME   PMOD_EXPORT void f_gethrtime(INT32 args)   {    int nsec = 0; -  nsec = args && !UNSAFE_IS_ZERO(sp-args); +  nsec = args && !UNSAFE_IS_ZERO(Pike_sp-args);       pop_n_elems(args);    if(nsec)    push_int64(gethrtime());    else    push_int64(gethrtime()/1000);   }   #else   PMOD_EXPORT void f_gethrtime(INT32 args)   {    int nsec = 0; -  nsec = args && !UNSAFE_IS_ZERO(sp-args); +  nsec = args && !UNSAFE_IS_ZERO(Pike_sp-args);       pop_n_elems(args);    GETTIMEOFDAY(&current_time);   #ifdef INT64    if(nsec)    push_int64((((INT64)current_time.tv_sec * 1000000) + current_time.tv_usec)*1000);    else    push_int64(((INT64)current_time.tv_sec * 1000000) + current_time.tv_usec);   #else /* !INT64 */    if(nsec)