home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!tsp.med.umn.edu!jalegre
- From: jalegre@tsp.med.umn.edu (John Alegre)
- Subject: Trouble with setitimer and getitimer.
- Message-ID: <1993Jan8.215018.29800@news2.cis.umn.edu>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: tsp.med.umn.edu
- Organization: University of Minnesota
- Date: Fri, 8 Jan 1993 21:50:18 GMT
- Lines: 38
-
- 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
- #############################################################
-
-