# Where can I find the Java source code for the delay() method?

**URL:** https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222
**Category:** Beginners
**Created:** [April 3, 2024, 3:07am UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222 "2024-04-03T03:07:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sspboyd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sspboyd/32/1789_2.png) [@sspboyd](https://discourse.processing.org/u/sspboyd)
#### Post date: [April 3, 2024, 3:07am UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222/1 "2024-04-03T03:07:40Z")

</div>

I am trying to learn a little about the Processing source code for the delay() method. I have tried searching through the GitHub repo without any success.

Any suggestions?

> **[delay() / Reference](https://processing.org/reference/delay_.html)**
>
> The delay() function causes the program to halt for a specified time. Delay times are specified in thousandths of a second. For example, running delay(3000) will stop the program for thr…

Thanks,  
Stephen

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [April 3, 2024, 3:10am UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222/2 "2024-04-03T03:10:50Z")

</div>

> <https://github.com/benfry/processing4/blob/processing-1293-4.3/core/src/processing/core/PApplet.java#L3024-L3032>

---

<div class="post-metadata">

### Author: ![sspboyd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sspboyd/32/1789_2.png) [@sspboyd](https://discourse.processing.org/u/sspboyd)
#### Post date: [April 3, 2024, 3:01pm UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222/3 "2024-04-03T15:01:00Z")

</div>

Thank you @GoToLoop

Can you let me know how you found this? I assume I’m missing something pretty obvious but I’d like to be able to do it myself rather than asking here.

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [April 3, 2024, 3:47pm UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222/4 "2024-04-03T15:47:35Z")

</div>

I used CTRL + F on the class PApplet.java file page, and searched for “delay(” backwards.

---

<div class="post-metadata">

### Author: ![sspboyd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sspboyd/32/1789_2.png) [@sspboyd](https://discourse.processing.org/u/sspboyd)
#### Post date: [April 3, 2024, 7:33pm UTC](https://discourse.processing.org/t/where-can-i-find-the-java-source-code-for-the-delay-method/44222/5 "2024-04-03T19:33:19Z")

</div>

thanks again! I was looking in src / core and places like that. I will look in the PApplet.java file from now on. 🙏
