Revision dd005a64-9370-4a51-94e4-51502067a508 - Code Golf Stack Exchange
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.
#To clarify
- 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.
- At `18:00`, the top line is just `18` (Trailing spaces allowed but not required)
- At `18:59`, the bottom line is `19 -`
- The hours < 10 are either pre-padded with a `0` (`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.
- The display needs to be updated once a minute, but that doesn't have to happen at exactly `00` seconds.
#Input
None.
#Output
- 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.
#Additional rules
- [Standard loopholes](http://meta.codegolf.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are forbidden
- [tag:code-golf], shortest answer in bytes wins.