Q:

SpriteKit custom action with duration of 0.0 is called twice the first time it is ran

I'm unsure of whether this is a bug or I'm doing something wrong, but when I try and run a custom action with a duration of 0.0, the block runs two times. For instance, if I put this code inside a scene's init method, I get the following output:
SKAction *doThis = [SKAction customActionWithDuration:0.0 actionBlock:^(SKNode *node, CGFloat elapsedTime) {
    NSLog(@"DO THIS");
}];
[self runAction:doThis];

2014-03-13 01:41:11.271 Leapfrog[2168:60b] DO THIS
2014-03-13 01:41:11.287 Leapfrog[2168:60b] DO THIS

If I attempt to run two actions in sequence, the first time it executes twice, the second time it executes once, like so:
SKAction *doThis = [SKAction customActionWithDuration:0.0 actionBlock:^(SKNode *node, CGFloat elapsedTime) {
    NSLog(@"DO THIS");
}];
SKAction *doThat = [SKAction customActionWithDuration:0.0 actionBlock:^(SKNode *node, CGFloat elapsedTime) {
    NSLog(@"DO THAT");
}];
NSArray *actions = [NSArray arrayWithObjects:doThis, doThat, nil];
SKAction *sequence = [SKAction sequence:actions];
[self runAction:sequence];

2014-03-13 01:46:11.910 Leapfrog[2184:60b] DO THIS
2014-03-13 01:46:11.926 Leapfrog[2184:60b] DO THIS
2014-03-13 01:46:11.942 Leapfrog[2184:60b] DO THAT

So far, the only way I've figured out how to get it to run properly is to include a dummy action at the beginning:
SKAction *wait = [SKAction waitForDuration:0.0];
SKAction *doThis = [SKAction customActionWithDuration:0.0 actionBlock:^(SKNode *node, CGFloat elapsedTime) {
    NSLog(@"DO THIS");
}];
SKAction *doThat = [SKAction customActionWithDuration:0.0 actionBlock:^(SKNode *node, CGFloat elapsedTime) {
    NSLog(@"DO THAT");
}];
NSArray *actions = [NSArray arrayWithObjects:wait, doThis, doThat, nil];
SKAction *sequence = [SKAction sequence:actions];
[self runAction:sequence];

2014-03-13 01:48:41.946 Leapfrog[2192:60b] DO THIS
2014-03-13 01:48:41.964 Leapfrog[2192:60b] DO THAT

Am I stuck putting in a wait action with zero duration every time I want to do this sort of thing? 

A:

Explanation
The 'cutomActionDuration' is in seconds and the action is executed until '1 second' is passed. There is enough time to execute the action between '0 and 1' second (e.g., there are 1000 miliseconds in one second). Depending on the speed of the machine/PC you are using, you will see the action executed multiple times or once. 
Solution with RunBlock
'customActionWithDuration' is intended for repetitive actions. If you want to execute an action once there is 'runBlock' action available. The drawback is this you cannot pass the node as parameter to the block. But you can use other tricks to overcome this shortcoming (e.g., storing the node in some global variable before running the block. The block will be executed for the global node). Here is the sample:
SKAction* blockAction = [SKAction runBlock:^{
        //your actions here 
        [SomeNode.physicsBody  applyImpulse:(10,10)];      

    }];

[SomeNode runAction:blockAction];

Solution with cutomActionWithDuration
If you still want to use 'customActionWithDuration'. I have work around
SKAction* applyImpulse =[SKAction customActionWithDuration:0.000001      actionBlock:^(SKNode *node, CGFloat elapsedTime) {
        if(!(elapsedTime>0)){
            //Do your thing here :)
        }

    }];

