Replies

  • A timer in Javascript is a function that enables us to execute a function at a particular time, delay the execution of code or repeatedly using an interval.

    SetTimeout() and setInterval() are the two timer functions in JavaScript.

    a) The setTimeout(function, delay) function initiates a timer that schedules a specified function to trigger at a specific time from the current time and returns an id value that can be used to access it later.

    b) The setInterval() function is similar to the setTimeout function except that it executes a specified piece of code just once after a certain period of time and only stops when canceled.

    SetInterval starts a function every n milliseconds, without any consideration about when a function ends its execution.

    To disable the timer functions you can use the clearTimeout() and clearInterval() functions which stops a timer.

    Software quality assurance company knows that timer isn't the most accurate and timer delay is not guaranteed.

    Timers can be tricky to accomplish for since they work within a single thread asynchronous events, thus events queue up waiting to execute and only run when there's been an opening in the execution.


    The setTimeout() will execute only when its turn comes in a queue if an earlier event (of setTimeout) blocks due to some reason setTimeout can be delayed than the specified time in setTimeout() function.setTimeout delay is not a guaranteed thing, but rather a minimum thing.

    There can be performance issues only when you don't track the interval ids and execute a number of intervals simultaneously, especially when the delay is very less.

    Best QA Outsourcing Services and Quality Assurance Company
    Reap the incomparable benefits of high quality offshore quality assurance services with QASource – Quality That Creates Value and deliver on time, ev…
This reply was deleted.
    results->result as $result) { ?>
  1. jobtitle;?>
    company;?>(formattedRelativeTime;?>)city;?>, state;?>
    Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.