plan 9 kernel history: overview | file list | diff list

1990/0614/port/devcons.c (diff list | history)

1990/06111/sys/src/9/port/devcons.c:315,3211990/0614/sys/src/9/port/devcons.c:315,321 (short | long | prev | next)
1990/0227    
long 
seconds(void) 
{ 
	return boottime + MACHP(0)->ticks*MS2HZ/1000; 
1990/0614    
	return boottime + TK2MS(MACHP(0)->ticks); 
1990/0227    
} 
 
int 
1990/06111/sys/src/9/port/devcons.c:470,4761990/0614/sys/src/9/port/devcons.c:470,476
1990/0227    
			l = u->p->time[i]; 
			if(i == TReal) 
				l = MACHP(0)->ticks - l; 
			l *= MS2HZ; 
1990/0614    
			l = TK2MS(l); 
1990/0227    
			readnum(0, tmp+NUMSIZE*i, NUMSIZE, l, NUMSIZE); 
		} 
		memcpy(buf, tmp+k, n); 
1990/06111/sys/src/9/port/devcons.c:486,4921990/0614/sys/src/9/port/devcons.c:486,492
1990/0227    
		return readnum(c->offset, buf, n, u->p->parentpid, NUMSIZE); 
 
	case Qtime: 
		return readnum(c->offset, buf, n, boottime+MACHP(0)->ticks/(1000/MS2HZ), 12); 
1990/0614    
		return readnum(c->offset, buf, n, boottime+TK2MS(MACHP(0)->ticks), 12); 
1990/0227    
 
	case Quser: 
		return readstr(c->offset, buf, n, u->p->pgrp->user); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)