Actual source code: rs6000_time.c
petsc-3.3-p7 2013-05-11
2: #include <petscsys.h>
3: #include <sys/time.h>
4: #include <sys/systemcfg.h>
8: PetscLogDouble rs6000_time(void)
9: {
10: timebasestruct_t t;
11: PetscLogDouble time;
15: /* read in the register values */
16: read_real_time(&t,TIMEBASE_SZ);
17:
18: /*
19: * Call the conversion routines unconditionally, to ensure
20: * that both values are in seconds and nanoseconds regardless
21: * of the hardware platform.
22: */
23: time_base_to_time(&t,TIMEBASE_SZ);
24:
25: time = t.tb_high + t.tb_low*1.0e-9;
26: PetscFunctionReturn(time);
27: }