www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Timer library?

reply =?ISO-8859-1?Q?Pelle_M=E5nsson?= <pelle.mansson gmail.com> writes:
I'm in need for a timer library that measures the acutal time. I have 
tried std.c.time's clock(), but it only measures time spent inside the 
program, not actual time elapsed.

I need at least millisecond resolution, so std.c.time.time() is not an 
option.

I wonder, is there a good library for this?
Jan 25 2010
parent reply Stanislav Blinov <stanislav.blinov gmail.com> writes:
Pelle Månsson wrote:
 I'm in need for a timer library that measures the acutal time. I have 
 tried std.c.time's clock(), but it only measures time spent inside the 
 program, not actual time elapsed.
 
 I need at least millisecond resolution, so std.c.time.time() is not an 
 option.
 
 I wonder, is there a good library for this?
Have you tried std.date? :-)
Jan 25 2010
parent reply strtr <strtr spam.com> writes:
Stanislav Blinov Wrote:

 Pelle Månsson wrote:
 I'm in need for a timer library that measures the acutal time. I have 
 tried std.c.time's clock(), but it only measures time spent inside the 
 program, not actual time elapsed.
 
 I need at least millisecond resolution, so std.c.time.time() is not an 
 option.
 
 I wonder, is there a good library for this?
Have you tried std.date? :-)
and there is of course the undocumented std.perf.
Jan 25 2010
next sibling parent reply "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
strtr wrote:
 Stanislav Blinov Wrote:
 
 Pelle M幩sson wrote:
 I'm in need for a timer library that measures the acutal time. I have 
 tried std.c.time's clock(), but it only measures time spent inside the 
 program, not actual time elapsed.

 I need at least millisecond resolution, so std.c.time.time() is not an 
 option.

 I wonder, is there a good library for this?
Have you tried std.date? :-)
and there is of course the undocumented std.perf.
It's not undocumented, it's just badly linked-to. :) http://www.digitalmars.com/d/2.0/phobos/std_perf.html -Lars
Jan 25 2010
parent strtr <strtr spam.com> writes:
Lars T. Kyllingstad Wrote:

 It's not undocumented, it's just badly linked-to. :)
 
 http://www.digitalmars.com/d/2.0/phobos/std_perf.html
 
 -Lars
http://www.digitalmars.com/d/1.0/phobos/std_perf.html
Jan 25 2010
prev sibling parent =?UTF-8?B?UGVsbGUgTcOlbnNzb24=?= <pelle.mansson gmail.com> writes:
On 01/25/2010 04:02 PM, strtr wrote:
 Stanislav Blinov Wrote:

 Pelle M�nsson wrote:
 I'm in need for a timer library that measures the acutal time. I have
 tried std.c.time's clock(), but it only measures time spent inside the
 program, not actual time elapsed.

 I need at least millisecond resolution, so std.c.time.time() is not an
 option.

 I wonder, is there a good library for this?
Have you tried std.date? :-)
and there is of course the undocumented std.perf.
It seems std.perf is indeed suitable. Thank you!
Jan 25 2010