Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Even more problems with lcc-win Date: Tue, 28 Mar 2017 09:28:05 -0700 Organization: None to speak of Lines: 35 Message-ID: References: <5f2dnZm7l7YU8UTFnZ2dnUU7-X3NnZ2d@posted.internetamerica> <34af2a35-94cf-420a-bbec-01a4f4302050@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="621a15f5f24560a56e85ad6532f35357"; logging-data="2469"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cSnvsqoAxyV88r57DHBTf" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:HXbYJaDT4Gp+UMydMdK91ps+qc4= sha1:CwlRzEeCmhhP+IUMPYYUlcVDIHI= Xref: csiph.com comp.lang.c:107279 BartC writes: [...] > What is the purpose of defining CLOCKS_PER_SEC (not SECOND according to > Keith) if it always 1000000? You know, rather than qualifying that with "according to Keith", you could always check the C standard, which is exactly what I did. You have a copy of n1570.pdf and a way to view it, yes? You have a tendency to guess when it's completely unnecessary. Just look it up. (I'm not criticizing you for getting the name wrong originally; mistakes happen, and I've made plenty of them.) Who says it's *always* 1000000? It's always 1000000 on systems that conform to POSIX (and apparently on Windows systems as well), but the C standard covers *all* conforming C implementations, not just that subset. And even if it were always 10000000, having a name for it is much more legible and less error-prone than using a magic number. You probably didn't even notice the extra 0 I snuck into the previous paragraph. > Well, if you start coding in slightly more adventurous waters where you > don't have access to time.h (because of using a different language, or > one language compiles and executes another, neither of which is C, etc) > then these little details /can/ be obstacles if you're trying to use an > exported clock() function. Yes, some of what you're trying to do is difficult. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"