> For the complete documentation index, see [llms.txt](https://chasethestar.gitbook.io/ko.learn-rxjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chasethestar.gitbook.io/ko.learn-rxjs/rxjs/operators/filtering/debouncetime.md).

# debounceTime

#### signature: `debounceTime(dueTime: number, scheduler: Scheduler): Observable`

## Discard emitted values that take less than the specified time between output

***

💡 This operator is popular in scenarios such as type-ahead where the rate of user input must be controlled!

***

[![Ultimate RxJS](https://drive.google.com/uc?export=view\&id=1qq2-q-eVe-F_-d0eSvTyqaGRjpfLDdJz)](https://ultimatecourses.com/courses/rxjs?ref=4)

### Examples

**Example 1: Debouncing based on time between input**

( [StackBlitz](https://stackblitz.com/edit/typescript-adheqt?file=index.ts\&devtoolsheight=50) )

```js
// RxJS v6+
import { fromEvent } from 'rxjs';
import { debounceTime, map } from 'rxjs/operators';

// elem ref
const searchBox = document.getElementById('search');

// streams
const keyup$ = fromEvent(searchBox, 'keyup');

// wait .5s between keyups to emit current value
keyup$
  .pipe(
    map((i: any) => i.currentTarget.value),
    debounceTime(500)
  )
  .subscribe(console.log);
```

### Related Recipes

* [Save Indicator](/ko.learn-rxjs/rxjs/recipes/save-indicator.md)
* [Type Ahead](/ko.learn-rxjs/rxjs/recipes/type-ahead.md)

### Additional Resources

* [debounceTime](https://rxjs.dev/api/operators/debounceTime) 📰 - Official docs
* [debounceTime](https://indepth.dev/reference/rxjs/operators/debounce-time) - In Depth Dev Reference
* [Transformation operator: debounce and debounceTime](https://egghead.io/lessons/rxjs-transformation-operators-debounce-and-debouncetime?course=rxjs-beyond-the-basics-operators-in-depth) 🎥 💵 - André Staltz
* [Time based operators comparison](/ko.learn-rxjs/rxjs/concepts/time-based-operators-comparison.md)
* [Build your own debounceTime operator](https://blog.strongbrew.io/build-the-operators-from-rxjs-from-scratch/?lectureId=debounceTime#app) 🎥 - Kwinten Pisman

***

> 📁 Source Code: <https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/debounceTime.ts>
