> From: Edward Ned Harvey (bouncycastle)
> 
> One
> thread goes into a tight loop incrementing a counter.  Another thread goes
> into a loop sampling that counter. 

Whenever the second loop loops faster than the first loop, you will sleep 1ms, 
which brings up another point - 

The precision of clock ticks is 10million per second.  This means there are 
10,000 ticks per 1ms.  So if you just sleep 1ms, sample ticks, sleep 1ms, 
sample ticks, etc...  You could conceivable produce up to 14 bits of entropy 
per ms.  In reality, it's much lower than that, like 8 bits or so.  This is the 
basis of ThreadSchedulerRNG, in TinHat Random.  It has an infinite loop of 1ms 
sleeps, and sampling clock ticks, and extracts 4 bits of entropy per ms.

Reply via email to