Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

229
Vistas
How to make an api request every minute based on props that are updating every 3 seconds?

I am trying to make an api request every minute based on a set of conditions. The issue Im having is the props I am reading are updating every 3 seconds so if I create a function with a setTimeout or any timer method inside seems to reset every 3 seconds so it can never make it to one minute. I am new to dev and Ive never done anything like this, any advice would be helpful. Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Settimeout only work once you need to use setinterval instead it will repeat every 3 second You can make 2 interval one run every 3 second and the other every minute Or you can make variable every time the function run increment it by 1 and every time this variable is divisable by 20 (mean 60 sec passed) you can call the api

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda