wait for the clock to chime. see how many minutes YOU can waste! and don't worry about losing your place; the clock keeps going when the project is stopped. why not read something to help pass all that time? i'll start you off: --BEHIND THE CLOCK-- i've already said, but the clock keeps going while the project is stopped. this is only half true by the way, it keeps ticking down but it doesn't restart after it runs out unless at least 1 person has the project running. but how is even that possible, a timer that runs down without the project running? our quasi-constant timer (quasi- means "apparently but not exactly") takes two very simple things. the "days since 2000" block and a cloud variable set to the end of the timer. days since 2000 is pretty simple; it tells you how many days it's been since january 1st, 2000, with a lot of decimal places to show you how much of today has passed, which means you can see really well how much time has passed since 2000. so well, in fact, that it's basically a way to tell the time. if you check days since 2000 right now, and save that number, you have a number to show what time it was when you saved it, even if it's hard for you and i to read. very useful for computers though! we call these numbers timestamps. the same is true for future times, we just have to do some math. for my project, i just want to get the timestamp for 1 minute from now, so what do i do? well, days since 2000 is measured in days, so 1 means 1 day. 1 day is split up into 24 hours, so 1 divided by 24 would give you one hour according to this number. 1 hour is split up into 60 minutes, so divide that number by 60 and you get a minute. technically i could stop here, but i like to have more control over these things, and i bet you would too, so we can split up minutes into seconds by dividing that number into 60. so, after getting how much a second is, we can do some more maths to say how much time in the future you want, and add that to our timestamp. and with that, we have our timestamp, for 1 minute in the future: days since 2000+((((1/24)/60)/60)*60) so now all we have to do is save that value, in this case in a cloud variable since i want it to keep updating every time the stamp passes. then we check for if "days since 2000" is greater than that cloud variable. if so, set it to days since 2000 plus one minute again. now we're counting down one minute over and over again, like clockwork. (sorry, couldn't help myself.) it's also worth noting that you don't even need to add to "days since 2000" for dates that don't change, like a timer counting down until the year 2026. using some math you can just figure out the amount of days between january 1st 2000 and a different date, then check days since 2000 against the timestamp you calculated yourself. and creating consistent timers for big events is only the beginning of what's possible with days since 2000! there's a good deal of sounds. and that's how my cloud timer keeps the time! all thanks to an often-overlooked sensing block. maybe later i could write about how i displayed the clock face or the digital clock, or played those fading ticking noises every second, but i think you're all clever enough to check the code yourself in the meantime. fun fact: there's actually a similar system to our days since 2000 stamps that programmers outside Scratch use called "Unix time" that counts the amount of seconds since january 1st 1970.
Feel free to use this clock for anything. It's all in one sprite so it's easy to backpack. I'd appreciate credit, but it's not required. https://en.scratch-wiki.info/wiki/Days_Since_2000