home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Photo CD Demo 1
/
Demo.bin
/
gle
/
gle
/
ptime.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-29
|
874b
|
41 lines
#include <stdio.h>
#include <jpidef.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 */
long *addr; /* address of buffer used in SYS$GETUAI call */
long *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;
long 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;
}