home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / internal / 1940 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.3 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!umn.edu!math.fu-berlin.de!uniol!majestix.informatik.uni-kiel.dbp.de!gonzo!erik
  2. From: erik@sfb313.uni-kiel.dbp.de (Erik Cickovskis)
  3. Newsgroups: comp.unix.internals
  4. Subject: Measuring the time of a function
  5. Keywords: time function
  6. Message-ID: <356@gonzo.sfb313.uni-kiel.dbp.de>
  7. Date: 2 Nov 92 07:12:38 GMT
  8. Organization: SFB-313 University of Kiel, Germany
  9. Lines: 25
  10.  
  11.  
  12. Is it possible to evaluate the time a function needs to execute in
  13. C and UNIX?
  14.  
  15. For my thesis I am writing C programms doing some mathematical
  16. optimaziation stuff. I would like to know what time a function
  17. needs, which executes the critical calculations.
  18.  
  19. The problem is, now, that the functions in consideration need
  20. about some milliseconds to execute, and I need to be quite
  21. accurate.
  22.  
  23. So what can I do to prevent kernel execution time to be measuered
  24. with my function execution time. I thougt about it a lot and tend
  25. to think it is impossible in a time sharing environment, but who
  26. knows...
  27.  
  28. Realise that I don't want the whole programm to be timed, just
  29. one function in it.
  30.  
  31. Any hints welcome, Erik
  32. -- 
  33. ------------------------------------------------------
  34. Erik Cickovskis            erik@sfb313.uni-kiel.dbp.de
  35. ------------------------------------------------------
  36.