pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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.cmod,v 1.222 2008/07/08 12:27:05 grubba Exp $ + || $Id: builtin.cmod,v 1.223 2008/07/11 14:35:13 mast Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin.cmod:2932:    /*! @decl float peek()    *! Return the time in seconds since the last time @[get] was called.    */    PIKEFUN float peek( )    {    extern struct timeval current_time;    FLOAT_TYPE res;    if( THIS->hard_update )    GETTIMEOFDAY( &current_time );    res = current_time.tv_sec-THIS->last_time.tv_sec + -  (current_time.tv_usec-THIS->last_time.tv_usec)/1000000.0; +  (current_time.tv_usec-THIS->last_time.tv_usec)/(FLOAT_TYPE) 1000000.0;    RETURN res;    }       /*! @decl float get()    *! Return the time in seconds since the last time get was called.    *! The first time this method is called the time since the object    *! was created is returned instead.    */    PIKEFUN float get( )    {