Measuring method execution time
Because you are interested in the time it took and not the stopwatch, you should return a TimeSpan. And since we no longer need stopwatch as a parameter, we can rename timer to stopwatch (as "timer" makes me think of the Timer class).

public static void Invoke(Action action, out TimeSpan timeSpan)
{
    var stopwatch = Stopwatch.StartNew();
    action.Invoke();
    stopwatch.Stop();
    timeSpan = stopwatch.Elapsed;
}