home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4900 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: function TIMING in Windows: HELP 
  5. Distribution: world
  6. References: <1993Jan11.135908.11287@doug.cae.wisc.edu>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 31
  11. Date: Tue, 12 Jan 1993 19:35:54 +0000
  12. Message-ID: <726867354snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <1993Jan11.135908.11287@doug.cae.wisc.edu> ahrikenc@hprisc-12.cae.wisc.edu writes:
  16.  
  17. >
  18. >Is there any way I can time an algorithm that is part of a Windows
  19. >application?  For example, Unix allows finding the CPU time spent
  20. >specifically on executing a given set of instructions.
  21. >
  22. >In Windows, I used the gettime function and computed the difference
  23. >of the times at two points, and I get different results at different
  24. >times, for the same points, the same data;  I believe this is due to
  25. >the fact that Windows continuously executes other tasks in the 
  26. >background, which explains the difference in the results.
  27. >
  28. >Please help! 
  29. >
  30. >
  31. >
  32.  
  33. What you need is a good profiling tool.  This will show you the time
  34. spent in the various parts of the application.  A very good one comes
  35. with Microsoft C++, and I believe you get one with Borland C++, too.
  36.  
  37. Chris
  38. -- 
  39. --------------------------------------------------------------------------
  40. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  41. | Warrington, UK                           | BIX: cmarriott              |
  42. | (Still awaiting inspiration              | CIX: cmarriott              |
  43. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  44. --------------------------------------------------------------------------
  45.  
  46.