# Help to clear a void

**URL:** <https://discourse.processing.org/t/help-to-clear-a-void/4920>\
**Category:** Coding Questions\
**Created:** [October 27, 2018, 10:49am UTC](https://discourse.processing.org/t/help-to-clear-a-void/4920 "2018-10-27T10:49:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)\
**Post date:** [October 27, 2018, 10:49am UTC](https://discourse.processing.org/t/help-to-clear-a-void/4920/1 "2018-10-27T10:49:02Z")

</div>

Hi I just wanted to know if you can clear a void after a certain amount of time or after you press a key

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [October 27, 2018, 11:42am UTC](https://discourse.processing.org/t/help-to-clear-a-void/4920/2 "2018-10-27T11:42:02Z")

</div>

What do you mean by clear? If you just don‘t want the code to be executed, just add an if Statement that encapsulates the whole method and set the if Statement to false after a certain Time.

---

<div class="post-metadata">

**Author:** ![jensemand](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jensemand](https://discourse.processing.org/u/jensemand)\
**Post date:** [October 27, 2018, 12:27pm UTC](https://discourse.processing.org/t/help-to-clear-a-void/4920/3 "2018-10-27T12:27:49Z")

</div>

ty that was what i needed
