is it possible to calculate with times?
for example: getDate() - triggertime (to test in an if-Statement whether the result is bigger then 10 minutes)
thanks
calculations with time
Moderator: Martin
Re: calculations with time
Hi,
The function getDate and triggertime return the number of milliseconds since 1970. You can directly use the values to calculate the difference:
diff = getDate() - triggertime;
if(diff>10*60*1000)
{
...
}
Regards,
Martin
The function getDate and triggertime return the number of milliseconds since 1970. You can directly use the values to calculate the difference:
diff = getDate() - triggertime;
if(diff>10*60*1000)
{
...
}
Regards,
Martin