tprint time output on the same line - stopwatch - simple timer for console or x root window
 (HTM) git clone git://src.adamsgaard.dk/stopwatch
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2a1619b38698fc684593f26ba052a929ed6acca9
 (DIR) parent 726a3f3bb2024aacae76badec62e8cc0142b18f9
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Thu,  5 Nov 2020 07:25:40 +0100
       
       print time output on the same line
       
       Diffstat:
         M stopwatch.c                         |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/stopwatch.c b/stopwatch.c
       t@@ -39,7 +39,7 @@ print_loop(unsigned int interval, char *prefix, char *postfix)
        
                while (1) {
                        format_time(buf, sizeof(buf), time(NULL) - t_start, prefix, postfix);
       -                printf("\r%s\n", buf);
       +                printf("\r%s", buf);
                        fflush(stdout);
                        sleep(interval);
                }