user43638: Currently to use TimedAction for a function a program would look like so:
#include <TimedAction.h>
void functionX();
TimedAction funtionTimed = TimedAction(1000, functionX);

void setup()
{

}


void loop()
{
functionTimed.check();
}


void functionX()
{
 //run function
}

My question is say I have an object class with some functions I would like to use with this TimedAction library. How would this be written?

user4143: You can't. The TimedAction class doesn't support the function prototype required for your undefined class (it has to match your class, so can't be written).
You have to call a normal function which then calls the class function, or you have to have your class function as static so it doesn't include the class in the function prototype.
class foo {
    public:
        static void runMe() { 
            // blah blah
        }
};

TimedAction funtionTimed = TimedAction(1000, foo::runMe);

However, TimedAction is pretty simplistic and you don't really need it.  You can just write a function to only run every so often:
class foo {
    private:
        uint32_t _runMeTimestamp;
    public:
        void runMe() {
            if (millis() - _runMeTimestamp < 1000) return;
            _runMeTimestamp = millis();
            // blah blah
        }
};

foo myFoo;

void loop() {
    myFoo.runMe();
}

Those two lines of code, plus a variable to store the timestamp in, are all you need to make a function run at periodic intervals.

43638: <p>Currently to use TimedAction for a function a program would look like so:</p>

<pre><code>#include &lt;TimedAction.h&gt;
void functionX();
TimedAction funtionTimed = TimedAction(1000, functionX);

void setup()
{

}


void loop()
{
functionTimed.check();
}


void functionX()
{
 //run function
}
</code></pre>

<p>My question is say I have an object class with some functions I would like to use with this TimedAction library. How would this be written?</p>
 4143: <p>You can't. The TimedAction class doesn't support the function prototype required for your undefined class (it has to match your class, so can't be written).</p>

<p>You have to call a normal function which then calls the class function, or you have to have your class function as <code>static</code> so it doesn't include the class in the function prototype.</p>

<pre><code>class foo {
    public:
        static void runMe() { 
            // blah blah
        }
};

TimedAction funtionTimed = TimedAction(1000, foo::runMe);
</code></pre>

<p>However, TimedAction is pretty simplistic and you don't really need it.  You can just write a function to only run every so often:</p>

<pre><code>class foo {
    private:
        uint32_t _runMeTimestamp;
    public:
        void runMe() {
            if (millis() - _runMeTimestamp &lt; 1000) return;
            _runMeTimestamp = millis();
            // blah blah
        }
};

foo myFoo;

void loop() {
    myFoo.runMe();
}
</code></pre>

<p>Those two lines of code, plus a variable to store the timestamp in, are all you need to make a function run at periodic intervals.</p>
