MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: CPU times

  • To: mathgroup at
  • Subject: [mg13345] Re: [mg13228] CPU times
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Mon, 20 Jul 1998 02:50:01 -0400
  • Sender: owner-wri-mathgroup at


Your first problem is to find out what operating system You are using!
If You find out, that You are working with Windows 95 You are happy
because the time information of Win95 is broken and You need to do

On a unix system the times() function return a struct with the user,
total and cpu
time for the individual process. So in Your C++ code You can only get
the CPU
time that is spend by this process not the time the is spend by the
Mathematica kernel.
Mathematica's  Timing[] function returns the time of the kernel
evaluation and something like

  ... /* whats to be done by Mathematica */ /* waiting for the result */

/* Timing[] returns {time * Second, result }  */
  ... /* get Your result */

will work.

Hope that helps

-----Original Message-----
From: SAgca at <SAgca at>
To: mathgroup at
Subject: [mg13345] [mg13228] CPU times

>     Hi
>     I have some more questions. I am carrying out a research where I
>use multivariate probabilities extensilevly. I am using some
>approximation algorithms and numerical methods. I want to compare the
>with Mathematica results. Now I have 2 problems:
>     1. I am working on C++, and I need to call Mathematica from the
>code at various points.
>     2. I need the CPU time. If I use the CPU time of C++ code where I
>am calling Mathematica, will it give accurate CPU time?
>     Thanks.
>     Senay

  • Prev by Date: output to a plain text file
  • Next by Date: Re: Derivatives D[ ] as Functions: Summary (LONGISH)
  • Previous by thread: CPU times
  • Next by thread: Solving Polynomial Equations?