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.215 2008/06/27 11:28:39 grubba Exp $ + || $Id: builtin.cmod,v 1.216 2008/06/28 22:05:01 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:2849:   #else    RETURN (current_time.tv_sec * 1000000 + current_time.tv_usec);   #endif    }       PIKEFUN int `[]( string x )    {    f_Time_cq__backtick_2D_3E( args );    }    -  /*! @decl static void create( int fast ); +  /*! @decl protected void create( int fast );    *!    *! If @[fast] is true, do not request a new time from the system,    *! instead use the global current time variable.    *!    *! This will only work in callbacks, but can save significant amounts    *! of CPU.    */    PIKEFUN void create( int|zero|void fast )    {    THIS->hard_update = !fast;
pike.git/src/builtin.cmod:2900:    *! was created is returned instead.    */    PIKEFUN float get( )    {    extern struct timeval current_time;    f_Timer_peek( 0 );    THIS->last_time = current_time;    return;    }    -  /*! @decl static void create( int|void fast ) +  /*! @decl protected void create( int|void fast )    *! Create a new timer object. The timer keeps track of relative time    *! with sub-second precision.    *!    *! If @[fast] is specified, the timer will not do system calls to get    *! the current time but instead use the one maintained by pike. This    *! will result in faster but more or less inexact timekeeping.    *! The pike maintained time is only updated when a @[Pike.Backend]    *! object stops waiting and starts executing code.    */    PIKEFUN void create( int|zero|void fast )