From: Wolfgang Denk Date: Tue, 31 May 2011 07:56:38 +0200 Subject: [U-Boot] [RFC][Timer API] Revised Specification - Implementation details In-Reply-To: <4DE47046.3010703@emk-elektronik.de> References: <4DDE5548.3020906@gmail.com> <4DDE8639.3090909@comcast.net> <20110527071355.5DA8014EF7F@gemini.denx.de> <4DDF543D.6020506@gmail.com> <20110527074832.5B98E1354FC@gemini.denx.de> <20110527112721.9023C101D7A@gemini.denx.de> <4DDFA206.5050101@psyent.com> <20110529155530.09A5F14EF7F@gemini.denx.de> <20110530105704.0C83F14EBCB@gemini.denx.de> <4DE3E890.5030402@emk-elektronik.de> <4DE4698D.2090206@emk-elektronik.de> <4DE47046.3010703@emk-elektronik.de> Message-ID: <20110531055638.2D55ACEA578@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Reinhard Meyer, In message <4DE47046.3010703@emk-elektronik.de> you wrote: > > Excuse me, but THIS API does not prevent the user to do a > "(get_timer() - start) < timeout" inside the loop, making your argument moot. You can be pretty sure that I will NAK any design that _prevents_ me from doing this when I have specific reasons to do exactly this or something similar. It is definitely a good idea to provide simple and reliable ways for standard tasks - but you also must provide the freedom to do things differently when the standard way does not fit for a reason or another. This is also why I consider it mandatory that get_timer() (or time_read() or whatever it is going t be called) uses a standard unit of time like milliseconds, and not som random internal scaling. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Just because your doctor has a name for your condition doesn't mean he knows what it is.