Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-12 - 43,50547/runtim.mac
There is 1 other file named runtim.mac in the archive. Click here to see a list.
TITLE	RUNTIM - Returns the runtime in seconds for the job  %1(4)

IF1,<	OPDEF	RUNTIM	[RUNTIM] >	;This allows RUNTIM as label and opcode

;This funtion may be called from FORTRAN-10 by
;
;	RTIME = RUNTIM(JOB)
;		or
;	RTIME = RUNTIM(0)
;
;The result is the runtime in seconds for the specified job, with zero meaning
;this job

	ENTRY	RUNTIM		;For library searches
	SIXBIT	/RUNTIM/	;For subroutine TRACE.
RUNTIM:	MOVE	0,@0(16)	;Get the job number (0 for this one)
	RUNTIM	0,		;Get runtime in thousandths of a second
	FSC	0,233		;Convert the runtime to floating point
	FDVRI	0,(1000.0)	;Convert milliseconds to seconds
	POPJ	17,		;Return with the result in AC 0
	END