Display a Digital Clock
(I see there are many clock challenges, I have tried to read them all, I'm pretty sure this is unique)
Write some code that continuously updates a digital clock displayed in the format
s can occupy 1 or 2 characters each. The restrictions in simple terms as @BlueEyedBeast put it, I basically want it to replace the time shown.
- Newlines are not allowed
- Trailing spaces are allowed
- Other trailing characters are not allowed
- No seconds should be missed (57 -> 59 is not allowed)
- Numbers beginning with "0" are allowed, as long as they don't occupy more than 2 characters
- The code must not accept any input
- If your language can't get the current time without input, you may use for input up to 8 bytes in a standardly allowed way
- Output must be to stdout
- This is codegolf so the shortest answer wins!
I'm working on a language named *><> (starfish) because programs like this aren't possible in ><> (just wait for file i/o) . Here's a working digital clock program in it (ungolfed). This program is written in *><>:
Note: Everything is identical to ><> in this except, s = second, m = minute, h = hour, S = sleep(100ms*x)
Updating every 100ms until terminated.
The following are not allowed:
The time must remain on the first line it was outputted with no visible trailing characters. Clearing the terminal though, would be allowed as that still wouldn't have any trailing characters.