pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.79 2002/02/28 10:58:57 grubba Exp $ +  * $Id: builtin.cmod,v 1.80 2002/04/06 21:04:46 grubba Exp $    */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:20:   #include "threads.h"   #include <math.h>   #include <ctype.h>   #include "module_support.h"   #include "cyclic.h"   #include "bignum.h"   #include "main.h"   #include "operators.h"   #include "builtin_functions.h"   #include "fsort.h" + #include "port.h"         /*! @decl array(array(int|string)) _describe_program(program p)    *!    *! Debug function for showing the symbol table of a program.    */   PIKEFUN array(array(int|string)) _describe_program(mixed x)    efun;   {    struct program *p;
pike.git/src/builtin.cmod:1836:    extern struct timeval current_time;    struct pike_string *usec;    struct pike_string *sec;    MAKE_CONSTANT_SHARED_STRING( sec, "sec" );    MAKE_CONSTANT_SHARED_STRING( usec, "usec" );       if( !x )    RETURN 0;       if( THIS->hard_update ) -  gettimeofday( &current_time, 0 ); +  GETTIMEOFDAY( &current_time );       if( x == usec )    RETURN current_time.tv_usec;    if( x == sec )    RETURN current_time.tv_sec;      #ifdef AUTO_BIGNUM    pop_stack();    push_int( current_time.tv_sec );    push_int( 1000000 );
pike.git/src/builtin.cmod:1878:   {    CVAR struct timeval last_time;    CVAR int hard_update;          PIKEFUN float peek( )    {    extern struct timeval current_time;    FLOAT_TYPE res;    if( THIS->hard_update ) -  gettimeofday( &current_time, 0 ); +  GETTIMEOFDAY( &current_time );    res = current_time.tv_sec-THIS->last_time.tv_sec +    (current_time.tv_usec-THIS->last_time.tv_usec)/1000000.0;    RETURN res;    }       PIKEFUN float get( )    {    extern struct timeval current_time;    f_Timer_peek( 0 );    THIS->last_time = current_time;    return;    }       PIKEFUN void create( int|void fast )    {    extern struct timeval current_time;    THIS->hard_update = !fast;    if( THIS->hard_update ) -  gettimeofday( &current_time, 0 ); +  GETTIMEOFDAY( &current_time );    THIS->last_time = current_time;    }   }         /*! @class SingleReplace    */   PIKECLASS single_string_replace   {    CVAR SearchMojt mojt;