Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: c_weed on November 24, 2011, 04:40:19 am

Title: What does the execution time measure?
Post by: c_weed on November 24, 2011, 04:40:19 am
What is the execution time measuring? I just got one of 18.055 s and it defiantly took less than 5 seconds.
Title: Re: What does the execution time measure?
Post by: MortenMacFly on November 24, 2011, 07:27:37 am
What is the execution time measuring? I just got one of 18.055 s and it defiantly took less than 5 seconds.
See for yourself:
http://svn.berlios.de/wsvn/codeblocks/trunk/src/tools/ConsoleRunner/main.cpp?peg=7603

It's platform dependent and you didn't mention version, OS, configuration etc...
Title: Re: What does the execution time measure?
Post by: c_weed on November 24, 2011, 08:14:25 am
Windows 7 Ultimate 64 bit, AMD Turion X2 64 bit cpu. Code::blocks 10.05 compiling with gcc -wall -ansi -pendantic
Title: Re: What does the execution time measure?
Post by: thomas on November 24, 2011, 09:48:47 am
It measures and displays wall clock time in millisecond resolution, using the system-provided timer (i.e. with approx 15ms accuracy under Windows, and <1ms accuracy under Linux). This includes the time to load the program as well as any time spent in waiting e.g. for useless live antivirus scanning stalling your computer before launching a program or time passing while e.g. your program displays "press any key to quit" at the end of its execution.

It is therefore very possible that the displayed time is much more than you'd think it should be.