home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sgi / 16093 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.4 KB  |  49 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!odin!bubba.wpd.sgi.com!probins
  3. From: probins@bubba.wpd.sgi.com (Paul Robins)
  4. Subject: Re: how to interrogate ftimer status from a program?
  5. Message-ID: <1992Nov6.213506.12264@odin.corp.sgi.com>
  6. Sender: news@odin.corp.sgi.com (Net News)
  7. Nntp-Posting-Host: bubba.wpd.sgi.com
  8. Reply-To: probins@wpd.sgi.com
  9. Organization: Silicon Graphics, Inc.
  10. References:  <23907@hacgate.SCG.HAC.COM>
  11. Date: Fri, 6 Nov 1992 21:35:06 GMT
  12. Lines: 35
  13.  
  14. In article <23907@hacgate.SCG.HAC.COM>, lee@luke.rsg.hac.com (C. Lee) writes:
  15. |> From the shell, I can type /etc/ftimer to see the status of the fast
  16. |> clock.  From a program, how can I find out the status of the fast
  17. |> clock?
  18. |> 
  19. |> Also, man ftimer says enabling and using fast itimers increases system
  20. |> overhead.  What about enabling the fast clock?
  21. |> 
  22. |> Thanks.
  23.  
  24.  
  25. Here is a code fragment that can help.
  26.  
  27.  
  28. #include <sys/syssgi.h>
  29.  
  30. /* check whether fastclock and timer were on before I started */
  31. /* note that there is no way to query the fastclock is on,    */
  32. /* but the timer cannot be on if the fastclock is not.        */
  33.  
  34. ftimerwasoff = !syssgi(SGI_QUERY_FTIMER);
  35.  
  36. Fast clock does not incur nearly the overhead of timers, but I don't have a
  37. relative number. I've been assured that it is of neglible impact.
  38.  
  39.  
  40.  
  41.  
  42. -- 
  43.  
  44.   --bubba
  45.  
  46.     hakuna matata
  47.  
  48.   390-1282      Mail stop 9U-510
  49.