Answer the question
In order to leave comments, you need to log in
How to find out how much time has passed since the start of the timer?
var timerId = setInterval(function() {
Startfnc();
}, 35000);
how to find out how much time has passed since the start of the timer?
so that the time would be displayed in this format: 2101
Answer the question
In order to leave comments, you need to log in
I think the decorator will help you
read the documentation on the topic here
UPDATE
in the node I execute the following js:
var time = new Date();
function Startfnc() {
console.log('Startfnc exec now');
time = new Date();
};
var timerId = setInterval(function () {
Startfnc();
}, 10000);
var logging = setInterval(function () {
var localdate = new Date();
console.log('last coll: ' + (localdate - time));
}, 2000);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question