I'd like you to build me a clock that displays time in this format:
18 ---------- 19 --------------------------------------------------
This displays '18:10'. The current hour and the next hour are shown at the front of the line, followed by a space and a number of dashes: on the first line the number of minutes that have passed in this hour, and the second line shows how many more minutes to go in this hour.
- The clock should display the system's time. If fetching the time from another source is more convenient, that's fine too. It may not be supplied as input.
18:00, the top line is just
18(Trailing spaces allowed but not required)
18:59, the bottom line is
- The hours < 10 are either pre-padded with a
01 -----) or right-aligned (
1 -----). A left-aligned single digit is not allowed, not even if the dashes start at the right place (
1 -----is invalid).
- The clock should display the hours in a 24h-format.
- Although it's called the 24h format, there is not actually a
24on it. During the 23rd hour, the second line starts with
- The display needs to be updated at least once a minute, but that doesn't have to happen at exactly
00seconds. You may update more frequently / continuously if that is more convenient, but the result must of course still be legible - not one smear all over the screen.
- As described above. Trailing spaces to pad the clock to 60-ish positions is allowed on both lines, a trailing newline is also allowed.
- The screen needs to be cleared when displaying the next minute: either with a clear-screen command or by adding no less than 30 newlines.
- Standard loopholes are forbidden
- code-golf, shortest answer in bytes wins.