_time.c 304 B

123456789101112131415161718
  1. #include <lib.h>
  2. #define time _time
  3. #include <time.h>
  4. PUBLIC long time(tp)
  5. long *tp;
  6. {
  7. int k;
  8. long l;
  9. k = _callm1(FS, TIME, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
  10. if (_M.m_type < 0 || k != 0) {
  11. errno = -_M.m_type;
  12. return(-1L);
  13. }
  14. l = _M.m2_l1;
  15. if (tp != (long *) 0) *tp = l;
  16. return(l);
  17. }