Hi All,
I would like to have a function which is executed with a certain probability say 0.1 or 0.2.
i.e. If I have a function say
caller()
{
called_probability(0.1);
}
whenever the function caller is called the function called_probability will execute with the probability of the argument, which in this case is 0.1.
How can I do so?
Thanks in advance,
Kartik