---
title: "Discussion on \"setTimeout() - an edge case\" | Hashnode"
description: "Discussion on \"setTimeout() - an edge case\". Recently, I had come across a bug that needed auto-refresh after a certain point of time. And setTimeout() had been used to count down to the time and reload the page. Little did I know that setTimeout() came with a price. \nAs quoted on MDN Web Docs ..."
url: "https://hashnode.com/posts/settimeout-an-edge-case/5f53c7e0fee30a7c48c0a7b2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [setTimeout() - an edge case](https://divyajyotiuk.hashnode.dev/settimeout-an-edge-case?utm_source=hashnode&utm_medium=feed)

Recently, I had come across a bug that needed auto-refresh after a certain point of time. And setTimeout() had been used to count down to the time and reload the page. Little did I know that setTimeout() came with a price. As quoted on MDN Web Docs ...

Sep 5, 2020 · 2 min read · divyajyotiuk.hashnode.dev  
Updated Nov 1, 2020  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Divyajyoti Ukirde](https://hashnode.com/@divyajyotiuk)

@divyajyotiuk · Pune, India

  
[View profile](https://hashnode.com/@divyajyotiuk)

I invest in knowledge

I am a Software Engineer aspiring to explore the depths of technology! Currently working on the following tech stack: Javascript, jQuery, HTML, CSS, Node.js, bootstrap 4, Python Pronoun: she/her

## Responses 1

Markdown supported · ⌘↵ to post

[Iroegbu Iroegbu](https://hashnode.com/@iroegbu)

[Sep 5, 2020](https://hashnode.com/posts/settimeout-an-edge-case/5f53c7e0fee30a7c48c0a7b2/comment/5f5410bafee30a7c48c0aa10)

Do you think using [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) will solve the original problem instead of using `setInterval`?

[Divyajyoti Ukirde](https://hashnode.com/@divyajyotiuk)

[Sep 7, 2020](https://hashnode.com/posts/settimeout-an-edge-case/5f53c7e0fee30a7c48c0a7b2/comment/5f5410bafee30a7c48c0aa10#reply-5f55e2d31417481575399868)

Since, I don't know the maximum time, I would avoid using any timer at all!
