strace/times.c
Elvira Khabirova 254ff1e623 resource.c: move times parser to a separate file
* times.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* resource.c (sys_times): Move to times.c.
2015-08-16 10:05:19 +00:00

20 lines
440 B
C

#include "defs.h"
#include <sys/times.h>
SYS_FUNC(times)
{
struct tms tbuf;
if (exiting(tcp)) {
if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
tprintf("{tms_utime=%llu, tms_stime=%llu, ",
(unsigned long long) tbuf.tms_utime,
(unsigned long long) tbuf.tms_stime);
tprintf("tms_cutime=%llu, tms_cstime=%llu}",
(unsigned long long) tbuf.tms_cutime,
(unsigned long long) tbuf.tms_cstime);
}
}
return 0;
}