Hello,
I noticed that the Service Running variable active_since returns milliseconds with 6 insted of 8 digits.
is that a correct time?
As per Supplied Variables description.
active_since
the time this service has been started in milliseconds since the device was booted
Obviously the right active_since can be calculated correclty even with 6 digits but then we are not dealing with milliseconds anymore, ergo, is the documentation faulty?
Oddly enough, if I wait for x minutes to run the same flow, the "millisecods" does not seem to get updated. It always shows the same time instead of the old time + x minutes.
I'm confused here.
Thanks
Husky
Weird milliseconds return in Service Running
Moderator: Martin
Weird milliseconds return in Service Running
"Basic research is what I'm doing when I don't know what I'm doing"
Re: Weird milliseconds return in Service Running
Hi,
The time active_since indicates the moment when the service was started (in millis since the device was started), not how long the service is already running.
You can convert the time to a normal date/time with a script like this:
started = triggertime - getElapsedRealtimeMillis() + active_since;
duration = triggertime - started;
Regards,
Martin
The time active_since indicates the moment when the service was started (in millis since the device was started), not how long the service is already running.
You can convert the time to a normal date/time with a script like this:
started = triggertime - getElapsedRealtimeMillis() + active_since;
duration = triggertime - started;
Regards,
Martin