Simple time duration for 2 sensors

Hi,

I just stated using the app and a beginner at programming. What I am trying to do is to set a timer that shows how long sensors have been active. I’m been trying to use the timer and time input widget, but I think it is not possible. So, my thought is to use either the Label or Value widget to get it display the time. I am having trouble to get the time to display correctly. I am coding with C and using a Raspberry PI for this project. Here is the part of the code I have written. Any suggestions will be helpful.

void sensorRunTime()
{
  if(pinStatusA == pinStatusB)
  {
     time.enable(timer1);
  }
  else
  {
    time.disable(timer1);
  }
}
void setup()
{
  runTime = (millis() - millis());
  timer1 = timer.setInterval(1000L, [](){Blynk.virtualWrite(V5, formatTime(runTime)});
  timer.disable( timer1);
}
void loop()
{
   Blynk.run();
   timer.run();
}

I am wondering if BlynkTimer (SimpleTimer) even works properly on a RPi platform? It is based on Arduino millis() function.

http://playground.arduino.cc/Code/SimpleTimer

I see, I will see if there is another method.