# Difference between two times (measuring time)

**URL:** <https://discourse.processing.org/t/difference-between-two-times-measuring-time/15728>\
**Category:** Coding Questions\
**Created:** [November 22, 2019, 11:42pm UTC](https://discourse.processing.org/t/difference-between-two-times-measuring-time/15728 "2019-11-22T23:42:10Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [November 24, 2019, 1:05pm UTC](https://discourse.processing.org/t/difference-between-two-times-measuring-time/15728/4 "2019-11-24T13:05:18Z")

</div>

I made a very similar sketch a year ago, although i used Date to save the current time and add some time to it, to know when i could perform an action the next time. (Like taking medicine every 4h or to stop smoking [with increasing intervals])

It worked quite well, while i used it 😅 If someones interested, i‘ll try to find the Code, but it’s pretty easy… just convert Date to int and add a value in milliseconds to in/decrease it.

Just had to comment cause the image is sooo similar 😅

---

_[View the full topic](https://discourse.processing.org/t/difference-between-two-times-measuring-time/15728)._
