digitalmars.D.learn - Time some code using Tango
- Matthias Walter (4/4) Feb 03 2009 Hi there,
- Jarrett Billingsley (9/13) Feb 03 2009 y used CPU-time. StopWatch and the other time functions I've found don't...
- grauzone (5/19) Feb 03 2009 If he had to use OS specific APIs (which would be another sad thing
- Jarrett Billingsley (2/6) Feb 03 2009 http://en.wikipedia.org/wiki/Timex_(Unix)
- Jarrett Billingsley (4/11) Feb 03 2009 I realize why I know it as timex and not as time - our school uses
Hi there, I'd like to time some functions using Tango, but only including the really used CPU-time. StopWatch and the other time functions I've found don't mind on the CPU usage, which means if I time multiple processes at once which share a single CPU, their times increase... Best regards Matthias Walter
Feb 03 2009
On Tue, Feb 3, 2009 at 5:54 PM, Matthias Walter <walter mail.math.uni-magdeburg.de> wrote:Hi there, I'd like to time some functions using Tango, but only including the reall=y used CPU-time. StopWatch and the other time functions I've found don't mi= nd on the CPU usage, which means if I time multiple processes at once which= share a single CPU, their times increase...Best regards Matthias WalterThat's something that the OS could do for you, like the "timex" command on unix. There's probably something magical in /proc/ that you can use. I have no idea what the corresponding functionality would be in Windows, but it probably has something.
Feb 03 2009
Jarrett Billingsley wrote:On Tue, Feb 3, 2009 at 5:54 PM, Matthias Walter <walter mail.math.uni-magdeburg.de> wrote:If he had to use OS specific APIs (which would be another sad thing about Tango), I'd suggest to use clock_gettime() with CLOCK_THREAD_CPUTIME_ID under Unix. What is timex?Hi there, I'd like to time some functions using Tango, but only including the really used CPU-time. StopWatch and the other time functions I've found don't mind on the CPU usage, which means if I time multiple processes at once which share a single CPU, their times increase... Best regards Matthias WalterThat's something that the OS could do for you, like the "timex" command on unix. There's probably something magical in /proc/ that you can use. I have no idea what the corresponding functionality would be in Windows, but it probably has something.
Feb 03 2009
On Tue, Feb 3, 2009 at 7:15 PM, grauzone <none example.net> wrote:If he had to use OS specific APIs (which would be another sad thing about Tango), I'd suggest to use clock_gettime() with CLOCK_THREAD_CPUTIME_ID under Unix. What is timex?http://en.wikipedia.org/wiki/Timex_(Unix)
Feb 03 2009
On Tue, Feb 3, 2009 at 7:40 PM, Jarrett Billingsley <jarrett.billingsley gmail.com> wrote:On Tue, Feb 3, 2009 at 7:15 PM, grauzone <none example.net> wrote:I realize why I know it as timex and not as time - our school uses Solaris on many of its machines.If he had to use OS specific APIs (which would be another sad thing about Tango), I'd suggest to use clock_gettime() with CLOCK_THREAD_CPUTIME_ID under Unix. What is timex?http://en.wikipedia.org/wiki/Timex_(Unix)
Feb 03 2009