How to make a custom digital clock

edited May 2015 in How To...

Hello :) I'm pretty new to coding and hoping someone could help me out. I'm trying to make a simple digital clock that displays in realtime the "age" of the earth. For example, "4.54 billion years: 201 days: 48 mins: 08 seconds (and counting)". I'm not sure how to manipulate the time functions to get what I want. Please HELP Thanks in advance :)

Tagged:

Answers

  • edited May 2015

    Well, second(), minute(), and hour() report the time on your system's clock.

    For everything else, a clever use of millis() is what you're probably going to need.

    As this forum is not for providing full-code solutions, you have to post (and please read the thread about how to format it correctly first!) your code showing your attempt at doing this before you'll get more help.

  • edited May 2015

    millis()...

    year() gets you our year (since Christ) so you need to add 4,54 billion years

    days is probably the hardest sind day() gets you only the day in the current month

Sign In or Register to comment.