Modified the code so that tries to collect a ceratin amount of prime numbers, but aborts after a maximal time given.