Lucky manta ray

This commit is contained in:
2026-02-02 19:38:02 +02:00
parent c24ef1cc2f
commit d1307a75b9
5 changed files with 363 additions and 25 deletions

View File

@@ -131,17 +131,16 @@ var bigColonBlink = []string{
}
// RenderBigClock renders the current time as massive ASCII block digits.
// Format: HH:MM:SS in 24h. The colon blinks on a 500ms cycle (offset from
// the second boundary so it doesn't flip in sync with the digits).
func RenderBigClock(t time.Time) string {
// Format: HH:MM:SS in 24h. blinkOnMs/blinkOffMs control the colon blink cycle.
func RenderBigClock(t time.Time, blinkOnMs, blinkOffMs int) string {
h := t.Hour()
m := t.Minute()
s := t.Second()
timeStr := fmt.Sprintf("%02d:%02d:%02d", h, m, s)
// 1500ms cycle: visible for 1000ms, hidden for 500ms.
colonVisible := t.UnixMilli() % 1500 < 1000
cycle := int64(blinkOnMs + blinkOffMs)
colonVisible := t.UnixMilli()%cycle < int64(blinkOnMs)
var lines [7]string
for i := range lines {