Inspiration
I use a stopwatch and timer functions on my Android very frequently, whether I'm cooking or waiting for laundry. I always need some kind of clock function. It's perhaps the most productive and useful feature on my Android, based on my usage. So, I thought I would make a stopwatch that is utterly useless.
What it does
Enter 'Lazy Stopwatch'. It counts 1 second at a time, after which you have to acknowledge it for its hard work in order for it to keep counting. It will need your validation every second, otherwise, it will stop counting.
How we built it
Simple HTML/JS/CSS. Make an HTML file, throw in a p tag or any kind of text display tag. Throw in a button for triggering the stopwatch, and we can move on to the JS. The CSS you can come up with yourself. The JS code consists of an interval function that is triggered by clicking the button the first time. We can use a boolean flag to make the stopwatch stop every second and wait for a button click.
Challenges we ran into
- The biggest challenge was coming up with a useless project idea.
- It was not clear how we could make the stopwatch stop running only in 1-second increments at first. It can be done using a condition inside the interval to only reset the flag when the milliseconds variable has reached a full rotation (i.e., millis%1000 == 0).
Accomplishments that we're proud of
Coming up with the idea.
What we learned
Our time management skills have much room for improvement.
What's next for Lazy Stopwatch
Nothing. This ends here, but if anyone decides to further improve it, it would be interesting to add memes or some kind of reaction pictures, or different kinds of text on the button to bring out the personality of the stopwatch. Something like 😫 when it's running, and 😪 when it stops. The more expressive and creative the pictures, the better.
Log in or sign up for Devpost to join the conversation.