/****************************************************************************** ** ** FILE ** rtclock.c ** ** DESCRIPTION ** sample timing routine for the cray-t3d using the rtclock(3C) ** function ** ** NOTES ** this program first calls rtclock() to initialize any internal ** tables/etc that might need taking care of. ** ** then a calibration value is computed by taking the difference ** of two subsequent calls to rtclock() -- this calibration time ** will be subtracted from the timed portions of the code in order ** to avoid calls to rtclock() being incorporated into the times ** of the timed functions ** ** finally the sleep(3C) function is timed and the values printed ** to stdout ** ** SAMPLE OUTPUT for WAIT_TIME 1 ** h4p:final>./a.out -npes 4 ** time (secs): 1.047676 time (ticks): 157167093 ** calibration (ticks): 28 ticks per second: 150015001 ** time (secs): 1.047680 time (ticks): 157167675 ** calibration (ticks): 28 ticks per second: 150015001 ** time (secs): 1.047675 time (ticks): 157166979 ** calibration (ticks): 28 ticks per second: 150015001 ** time (secs): 1.047679 time (ticks): 157167603 ** calibration (ticks): 28 ticks per second: 150015001 ** ******************************************************************************/ #ifndef lint static char *RCSid="$Header: /u/nccc/tkohno/work/timing/final/RCS/rtclock.c,v 1.5 1995/06/13 21:28:10 tkohno Exp tkohno $"; #endif /* Cont'd next slide... */
Generated with CERN WebMaker