The standard doesn't say.Pascal FTW. (j/k)
What does the clock() function do?
If it were 'hard' and well designed, most people wouldn't give a damn. It's the fact that it tries to be several different things at once that makes it an absolute pain in the ass to use. Gladly, I haven't coded in C++ for years, but there are some real painful memories there.lol, lets hate on a programming langauge cause its 'hard'.
you just won the olympic games of jumping to conclusionslol, lets hate on a programming langauge cause its 'hard'.
i hate java people... java is for shitty programmers that can't handle their own garbage collection, so they fuck systems up, and need their programming language to have a runtime that takes care of the garbage collection for them.
I agree.. its a pain, its typically not fun, and i haven't done it in a while either.If it were 'hard' and well designed, most people wouldn't give a damn. It's the fact that it tries to be several different things at once that makes it an absolute pain in the ass to use. Gladly, I haven't coded in C++ for years, but there are some real painful memories there.
I've always liked this quote: "C++: An octopus made by nailing extra legs onto a dog."
you just won the olympic games of jumping to conclusions
retard
but go on, try to defend clock(), I'd like to see your excuses
See, that's how we know american education sucks monkey balls.But as someone who recenetly went through the unversities, i see them preaching Java as some godsend to the programming community.
When in reality it's biggest + is the fact that you don't have to worry about shitty programmers who can't manage their own garbage collection.
The teachers justified it by saying 'when we taught C++, a lot of people failed, we switche dto java now most people pass' - and thats sad.
Infact its now evolved to - "when we taught java we had some people failing, now we teach python in the early levels cause everyone who pays attention passes"
btw python is the most garbage langauge ever invented.
See, that's how we know american education sucks monkey balls.
That it's so vague it's practically not defined? Have you read the standard?And...what's so bad about clock()?
Not to mention that clock_t is "defined" as any arithmetic type, and CLOCKS_PER_SEC doesn't necessarily contain the actual number of clocks per second.The clock function returns the implementation’s best approximation to the processor time used by the program since the beginning of an implementation-defined era related only to the program invocation. To determine the time in seconds, the value returned by the clock function should be divided by the value of the macro CLOCKS_PER_SEC. If the processor time used is not available or its value cannot be represented, the function returns the value (clock_t)(-1).