# From 0 to 100 script

**URL:** <https://discourse.processing.org/t/from-0-to-100-script/3667>\
**Category:** Coding Questions\
**Created:** [September 19, 2018, 12:17pm UTC](https://discourse.processing.org/t/from-0-to-100-script/3667 "2018-09-19T12:17:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![netillo](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@netillo](https://discourse.processing.org/u/netillo)\
**Post date:** [September 19, 2018, 12:17pm UTC](https://discourse.processing.org/t/from-0-to-100-script/3667/1 "2018-09-19T12:17:54Z")

</div>

Hello everyone,

I’m trying to write a script that goes from which goes from 0 to 100 in 10 minutes with the look of a digital clock.

I hope someone can help.

Thank you!

Cordially,  
Netillo

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [September 19, 2018, 1:20pm UTC](https://discourse.processing.org/t/from-0-to-100-script/3667/2 "2018-09-19T13:20:14Z")

</div>

Try to look at the `map()` function (for your number going from 0 to 100) and `millis()` for your 10 minutes :

- [https://processing.org/reference/map\_.html](https://processing.org/reference/map_.html)
- [https://processing.org/reference/millis\_.html](https://processing.org/reference/millis_.html)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 19, 2018, 1:32pm UTC](https://discourse.processing.org/t/from-0-to-100-script/3667/3 "2018-09-19T13:32:32Z")

</div>

also a good start for your ?6000 millis? timer can find  
[timer class](https://github.com/shiffman/LearningProcessing/tree/master/chp10_algorithms/example_10_05_OOP_Timer)

---

<div class="post-metadata">

**Author:** ![netillo](https://avatars.discourse-cdn.com/v4/letter/n/cab0a1/32.png) [@netillo](https://discourse.processing.org/u/netillo)\
**Post date:** [September 19, 2018, 2:55pm UTC](https://discourse.processing.org/t/from-0-to-100-script/3667/4 "2018-09-19T14:55:40Z")

</div>

> [@josephh](#):
>
> nction (for your number going from 0 to 1

Thank you very much!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [September 23, 2018, 4:43am UTC](https://discourse.processing.org/t/from-0-to-100-script/3667/5 "2018-09-23T04:43:22Z")

</div>

You may also be interested in the timing libraries:

> **[Lord-of-the-Galaxy/Timing-Utilities](https://github.com/Lord-of-the-Galaxy/Timing-Utilities)**
>
> Timing utilities library for Processing. Contribute to Lord-of-the-Galaxy/Timing-Utilities development by creating an account on GitHub.

> **[dhchoi/processing-countdowntimer](https://github.com/dhchoi/processing-countdowntimer)**
>
> CountdownTimer Library for Processing. Contribute to dhchoi/processing-countdowntimer development by creating an account on GitHub.

…and keep in mind that, unlike `millis()` (which is aligned to the sketch start time) `second()` and `minute()` are already aligned to the wall clock.

- [https://processing.org/reference/second\_.html](https://processing.org/reference/second_.html)
- [https://processing.org/reference/minute.html](https://processing.org/reference/minute.html)

Finally, you may be interested in example sketches and tutorials relating to time – for example:

- [https://processing.org/examples/clock.html](https://processing.org/examples/clock.html)
