Date: 2013-07-02T14:39:05+00:00

Actual source code: rs6000_time.c
petsc-3.4.2 2013-07-02

      2: #include <petscsys.h>
      3: #include <sys/time.h>
      4: #include <sys/systemcfg.h>

      8: PetscLogDouble  PetscReadRealTime(void)
      9: {
     10:   timebasestruct_t t;
     11:   PetscLogDouble   time;

     14:   /* read in the register values */
     15:   read_real_time(&t,TIMEBASE_SZ);

     17:   /*
     18:    * Call the conversion routines unconditionally, to ensure
     19:    * that both values are in seconds and nanoseconds regardless
     20:    * of the hardware platform.
     21:    */
     22:   time_base_to_time(&t,TIMEBASE_SZ);
     23:   time = t.tb_high + t.tb_low*1.0e-9;
     24:   PetscFunctionReturn(time);
     25: }