Learning Notes

in

To find how many CPU clocks have been run from the start of the program to now:

#include <time.h>
clock_t clockcycle;
clockcycle = clock();

CLOCKS_PER_SEC is a constant that shows how many CPU clocks per second. Divide the clock_t by CLOCKS_PER_SEC you get how many seconds the program runs.

Post new comment

The content of this field is kept private and will not be shown publicly.
If you have a Gravatar account, used to display your avatar. If you have a Gravatar account, used to display your avatar.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <span> <fn>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.

More information about formatting options

What is 17 + 62?
To combat spam, please solve the math question above.
Honey Pot that kill bots