_times.c 365 B

1234567891011121314151617
  1. #include <lib.h>
  2. #include <sys/types.h>
  3. #include <time.h>
  4. #define times _times
  5. #include <sys/times.h>
  6. PUBLIC clock_t times(buf)
  7. struct tms *buf;
  8. {
  9. clock_t k;
  10. k = (clock_t)_callm1(FS, TIMES, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
  11. buf->tms_utime = _M.m4_l1;
  12. buf->tms_stime = _M.m4_l2;
  13. buf->tms_cutime = _M.m4_l3;
  14. buf->tms_cstime = _M.m4_l4;
  15. return(k);
  16. }