#include <stdio.h>
#include <jpidef.h>
#include "int32.h"
struct item_struct           /* structure for use during calls to SYS$GETUAI */
  {
  short len;                 /* specifies length of buffer for SYS$GETUAI call */
  short code;                /* specifies item of information returned from SYS$GETUAI */
  int32 *addr;                /* address of buffer used in SYS$GETUAI call */
  int32 *rlen;                /* address of word which holds length of information returned */
  };
struct item_struct itmlst[2];  /* define itmlst which holds parameters passed to SYS$GETUAI call */
ptime ()
{
	int st; int xxx;
	static lastcpu;
	int32 cputime;
	itmlst[0].len = 4;
	itmlst[0].code = JPI$_CPUTIM;
	itmlst[0].addr = &cputime;
	itmlst[0].rlen = &xxx;
	st = SYS$GETJPI(0,0,0,itmlst,0,0,0);
	gprint("==CPUtime %d   diff=%d \n",cputime,cputime-lastcpu);
	lastcpu = cputime;
}
