Article View: comp.os.os2.programmer
Article #2273Timing the run time of an algorithm and accessing round up/round down
From: Ronald J. Vaniwaarden
Date: Sun, 04 Oct 1992 03:52
Date: Sun, 04 Oct 1992 03:52
24 lines
1103 bytes
1103 bytes
I am writing a program for which I need exact (as much as is possible) timings of the run time. Using the emx compiler and the following code: . . . T1 = clock(); algorithm crunching... T2 = clock(); cout<<T2 - T1<<"\n"; This gives the real time between the two calles to clock(). What I need is the actual CPU time. Is there anyway to get this?? I also need to access the round up and round down of a floating point number. Does anyone know of the system calls that are neccesary in order to get these figures? If one has a math coprocessor, I know that these are available but I do not know how to get ahold of those numbers. Thanks in advance --Ron
Technical Details
Message-ID:
<3956@copper.Denver.Colorado.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!mercury.cair.du.edu!copper!rvaniwaaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!mercury.cair.du.edu!copper!rvaniwaa From: rvaniwaa@copper.denver.colorado.edu (Ronald J. Vaniwaarden) Newsgroups: comp.os.os2.programmer Subject: Timing the run time of an algorithm and accessing round up/round down Message-ID: <3956@copper.Denver.Colorado.EDU> Date: 4 Oct 92 03:52:38 GMT Distribution: usa Organization: University of Colorado at Denver Lines: 25