Article View: comp.sys.next.programmer
Article #2249Trouble with setitimer and getitimer.
From: John Alegre
Date: Fri, 08 Jan 1993 21:52
Date: Fri, 08 Jan 1993 21:52
37 lines
1626 bytes
1626 bytes
I am trying to time a tight SCSI read loop on a
NeXT machine.
I am having trouble with the UNIX functions
setitimer and getitimer.
My code (or one variation of it) looks like this:
struct itimerval after;
setitimer(ITIMER_REAL, &after, 0L);
puts("Starting");
for(i=1;i<=num;i++)
[self performSCSIRequest];
puts("Done");
getitimer(ITIMER_REAL, &after);
I have not been able to get any kind of succesful
data out of setitimer or getitimer. If I do not
assvalues to the various componets of after,
I get back 0 or all fields. If I do assaign
initial values, I either get back the same values
or garbage.
All comments welcome
---
John N. Alegre
Andante Systems
VideoLabs Inc.
#############################################################
# NeXTMail preferred. |
# jdev@andante.mn.org |
# alegrej@andante.mn.org | If you plant ice,
# jalegre@lenti.med.umn.edu | you're gonna harvest wind!
# alegrej@libros.andante.mn.org | Hunter/Garcia
#############################################################
Technical Details
Message-ID:
<1993Jan8.215238.29927@news2.cis.umn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!tsp.med.umn.edu!jalegreShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!tsp.med.umn.edu!jalegre From: jalegre@tsp.med.umn.edu (John Alegre) Newsgroups: comp.sys.next.programmer Subject: Trouble with setitimer and getitimer. Message-ID: <1993Jan8.215238.29927@news2.cis.umn.edu> Date: 8 Jan 93 21:52:38 GMT Article-I.D.: news2.1993Jan8.215238.29927 Sender: news@news2.cis.umn.edu (Usenet News Administration) Organization: University of Minnesota Lines: 37 Nntp-Posting-Host: tsp.med.umn.edu