|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T e
Length: 904 (0x388) Types: TextFile Names: »etime.c«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks └─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21E/config/etime.c« └─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/config/etime.c«
/* char id_etime[] = "@(#)etime_.c 1.1"; * * Return the elapsed execution time for this process. * * calling sequence: * real time(2) * call etime (time) * where: * the 2 element array, time, will receive the user and system * elapsed time since the start of execution. * * This routine must be called as function, and returns the sum of * user and system times. The time array argument must always be given. * * The resolution for all timing is 1/100 second on 386 system. */ #include <sys/types.h> #include <sys/times.h> #include "hz.h" struct tb { float usrtime; float systime; }; double etime(et) struct tb *et; { struct tms clock; times(&clock); et->usrtime = (float) clock.tms_utime / (float) HZ; return(et->usrtime); } double etime_(et) struct tb *et; { struct tms clock; times(&clock); et->usrtime = (float) clock.tms_utime / (float) HZ; return(et->usrtime); }