 322ec9ef8b
			
		
	
	
		322ec9ef8b
		
	
	
	
	
		
			
			accounting from kernel (now in PM). Large amount of files in this commit is due to system time problems during development.
		
			
				
	
	
		
			19 lines
		
	
	
		
			388 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			388 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
| #include <lib.h>
 | |
| #define times	_times
 | |
| #include <sys/times.h>
 | |
| #include <time.h>
 | |
| 
 | |
| PUBLIC clock_t times(buf)
 | |
| struct tms *buf;
 | |
| {
 | |
|   message m;
 | |
| 
 | |
|   m.m4_l5 = 0;			/* return this if system is pre-1.6 */
 | |
|   if (_syscall(MM, TIMES, &m) < 0) return( (clock_t) -1);
 | |
|   buf->tms_utime = m.m4_l1;
 | |
|   buf->tms_stime = m.m4_l2;
 | |
|   buf->tms_cutime = m.m4_l3;
 | |
|   buf->tms_cstime = m.m4_l4;
 | |
|   return(m.m4_l5);
 | |
| }
 |