Oh!
I did some changes again and tested but not working even now.
Please edit to the code to make it workable.
int value;
Timer t(value, action);
int status(String command);
void setup()
{
pinMode(D7, OUTPUT);
// Particle.variable("value", value); to check value of value variable in console
Particle.function("status", status);
}
int status(String command) //enter value like 2000 through console to set 2 sec timer
{
value = command.toInt(); //convert string to int for timer
t.start();
return 0;
}
void action()
{
digitalWrite(D7, HIGH);
}