= std.perf = ''Part of'' StandardLibraryCategory == Description == Use the !HighPerformanceCounter object in std.perf to find out how long it takes to execute some code. == Example == {{{ #!d import std.stdio; import std.c.time; import std.perf; void main () { HighPerformanceCounter hpc = new HighPerformanceCounter(); hpc.start(); /* Code to be timed goes here ... just msleep for 1.2 seconds */ std.c.time.msleep(1200); hpc.stop(); writefln("hpc ms: ", hpc.microseconds(), " Seconds: ", hpc.microseconds() / 1000000.0); } }}} == Source == Contributed by Lynn in the [http://www.dsource.org/forums/viewtopic.php?p=2278#2278 forum]. || Link || http://www.dsource.org/tutorials/index.php?show_example=118 || || Posted by || jcc7 || || Date/Time || Wed Dec 15, 2004 2:31 pm ||