package main

import (
	"fmt"
	"time"
)

func main() {
	d, err := time.ParseDuration("1s")
	if err != nil {
		panic(err)
	}
	t := time.Tick(d)
	go func() {
		fmt.Printf("\033[2J\033[H")
		for {
			<-t
			fmt.Printf("\r%s", time.Now().Format(time.TimeOnly))
		}
	}()
	select {}
}
