title: How to compute the "15% of the time" randomness?
body: <p>I'm looking for a decent, elegant method of calculating this simple logic.<br>
  Right now I can't think of one, it's spinning my head.  </p>
  
  <p>I am required to do some action only 15% of the time.  </p>
  
  <p>I'm used to "50% of the time" where I just mod the milliseconds of the current time and see if it's odd or even, but I don't think that's elegant.</p>
  
  <p>How would I elegantly calculate "15% of the time"?  Random number generator maybe?<br>
  Pseudo-code or any language are welcome.</p>
  
  <p>Hope this is not subjective, since I'm looking for the "smartest" short-hand method of doing that.  </p>
  
  <p>Thanks.</p>