Google search just says that execution time is proportional to certainty with the relation that (1 — 1/2^certainity) is less than actual probability of returning a prime but no explicit formula is mentioned ! It would be great if someone can tell that! Thank you !
It is based on Miller-Rabin primality test, which gives O(klg2n)