I am trying to call a function 10 times at random intervals between them.

How can I achieve this?

I did come up with a method, but is is horribly ugly. It looks like this:

```
    var counter = 0
    NSTimer.scheduledTimerWithTimeInterval(arc4random_uniform(4)+2, target: self, selector: Selector("createNewTimer"), userInfo: nil, repeats: false)

    func createNewTimer(){
    // PERFORM STUFF YOU NEED TO
     counter++

     if counter <= 10{
        NSTimer.scheduledTimerWithTimeInterval(arc4random_uniform(4)+2, target: self, selector: Selector("createNewTimer"), userInfo: nil, repeats: false)
     }
    }

```

Is there a nicer way of calling function at random intervals?