From: Wolfgang Denk Date: Tue, 26 Oct 2010 11:33:55 +0200 Subject: [U-Boot] Timer implementations In-Reply-To: <4CC68A07.6050109@emk-elektronik.de> References: <1288054924-24989-1-git-send-email-nm@ti.com> <4CC62B6C.30601@emk-elektronik.de> <20101026052856.3D467152451@gemini.denx.de> <4CC66A67.4000608@emk-elektronik.de> <20101026054812.60816135DE3@gemini.denx.de> <4CC66ECA.9000106@emk-elektronik.de> <4CC67CA1.9090302@emk-elektronik.de> <20101026074132.8013C152451@gemini.denx.de> <4CC68A07.6050109@emk-elektronik.de> Message-ID: <20101026093355.A73D1152451@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 <4CC68A07.6050109@emk-elektronik.de> you wrote: > > > Also, this code _is_ a bit different, as "get_timer(0)" makes sure > > the counter starts ticking again at 0 > > Nope, it does not reset the counter itself. It returns the current > counter value (recalculated into CONFIG_SYS_HZ units). > Maybe you mean reset_timer() instead? Yes, you are right, I was wrong. > > have millisecond resolution. > > Actually CONFIG_SYS_HZ (whatever that is). It is defined to be 1000. > I think it is necessary to summarize all implicit or explicit documented > "defined to have's" regarding the timer and then to verify that all > implementations adhere to them. Indeed - documentation is an are where U-Boot has a serious lack. 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 at denx.de It's certainly convenient the way the crime (or condition) of stupidity carries with it its own punishment, automatically admisistered without remorse, pity, or prejudice. :-) -- Tom Christiansen in <559seq$ag1$1@csnews.cs.colorado.edu>