apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Marr <gr...@alum.wpi.edu>
Subject Re: [PATCH 3] example binary BUSEC for discussion
Date Thu, 11 Jul 2002 19:18:04 GMT
At 02:49 PM 07/11/2002, William A. Rowe, Jr. wrote:
>The code follows, patch attached is hard to follow.  [Like my code 
>isn't :o]
>
>/* Number of binary microseconds per second is (2^20)
>  * to keep the math fast and simple [binary arithmetic.]
>  */
>#define APR_BUSEC_BITS 20
>#define APR_BUSEC_PER_SEC APR_TIME_C(2 ^ APR_BUSEC_BITS)

Thanks, but (2 ^ APR_BUSEC_BITS) is 22 (^ is XOR).  You want 1 << 
APR_BUSEC_BITS.

-- 
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"


Mime
View raw message