Implement clockloop utility
[khome.git] / src / clockloop.c
1 #include <time.h>
2
3 #include <stdio.h>
4 #include <unistd.h>
5
6 #include <ncurses.h>
7
8
9 #define BS 50
10
11
12 int
13 main()
14 {
15 time_t t;
16 char buf[BS];
17
18 initscr();
19 timeout(0);
20 while (getch() == -1) {
21 t = time(NULL);
22 strftime(buf, BS, "%A %Y-%m-%d %H:%M:%S", localtime(&t));
23 mvprintw(0, 0, "%s", buf);
24 refresh();
25 }
26 endwin();
27 return 0;
28 }
This page took 0.055247 seconds and 4 git commands to generate.