The POSIX.xs is in the main perl source code distribution. Here's the code for times():
void
times()
PPCODE:
struct tms tms;
clock_t realtime;
realtime = times( &tms );
EXTEND(SP,5);
PUSHs( sv_2mortal( newSViv( (IV) realtime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_utime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_stime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cutime ) ) );
PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cstime ) ) );
It's hard to see how that could cause problems or take much time to return.
|