home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / next / programm / 8038 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.5 KB  |  50 lines

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!gaia.ucs.orst.edu!umn.edu!tsp.med.umn.edu!jalegre
  2. From: jalegre@tsp.med.umn.edu (John Alegre)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Trouble with setitimer and getitimer.
  5. Message-ID: <1993Jan8.215238.29927@news2.cis.umn.edu>
  6. Date: 8 Jan 93 21:52:38 GMT
  7. Article-I.D.: news2.1993Jan8.215238.29927
  8. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  9. Organization: University of Minnesota
  10. Lines: 37
  11. Nntp-Posting-Host: tsp.med.umn.edu
  12.  
  13. I am trying to time a tight SCSI read loop on a 
  14. NeXT machine.
  15.  
  16. I am having trouble with the UNIX functions
  17. setitimer and getitimer.
  18.  
  19. My code (or one variation of it) looks like this:
  20.  
  21. struct itimerval    after;
  22.  
  23. setitimer(ITIMER_REAL, &after, 0L);
  24.     puts("Starting");
  25.     for(i=1;i<=num;i++)    
  26.         [self performSCSIRequest];
  27.     puts("Done");
  28. getitimer(ITIMER_REAL, &after);
  29.  
  30. I have not been able to get any kind of succesful
  31. data out of setitimer or getitimer.  If I do not
  32. assvalues to the various componets of after,
  33. I get back 0 or all fields.  If I do assaign
  34. initial values, I either get back the same values
  35. or garbage.
  36.  
  37. All comments welcome
  38. ---
  39. John N. Alegre
  40. Andante Systems
  41. VideoLabs Inc.
  42.  
  43. #############################################################
  44. # NeXTMail preferred.             |
  45. # jdev@andante.mn.org             |
  46. # alegrej@andante.mn.org          | If you plant ice,
  47. # jalegre@lenti.med.umn.edu       |  you're gonna harvest wind!
  48. # alegrej@libros.andante.mn.org   |    Hunter/Garcia      
  49. #############################################################
  50.