I'm new to c#.
The problem:
I'd like to run a method within a timer, but the method returns/needs arguments not in the timers set of arguments.
The reason: The method is called regularly (EPOC Emotiv headset) and I would like it to be called only once a second.
It is called (I think) by a function:
EmoEngine.Instance.CognitivEmoStateUpdated += new EmoEngine.CognitivEmoStateUpdatedEventHandler(Instance_CognitivEmoStateUpdated);
the method that runs (too regularly) is:
void Instance_CognitivEmoStateUpdated(object sender, EmoStateUpdatedEventArgs e) { EmoState es = e.emoState; EdkDll.EE_CognitivAction_t currentAction = es.CognitivGetCurrentAction(); }
The sotware already comes with a timer runs to process events every second:
private void timer1_Tick(object sender, EventArgs e) { engine.ProcessEvents(); }
I wish I could simply place the method aboce (Instance_Cogn...) in the timer, an I think that would sove the problem..
What is the best way to do this please?
Many thx.