Posts

Showing posts with the label time

Time spent.

Image

Knr clock.

  Turn your computer into an old fashion clock. gcc knrclock.c -lm -ncurses -o knrclock invoke with: $ ./knrclock /*  * aclock - ascii clock for UNIX Console  *  * Copyright (c) 2002 Antoni Sawicki <tenox@tenox.tc>  * Version 1.8 (unix-curses); Dublin, June 2002  *  * Compilation: cc aclock-unix-knr.c -o aclock -lcurses -lm  *  * this is K&R version modified for old unices (but still with curses)  *  */ #include <unistd.h> #include <curses.h> #include <math.h> #include <time.h> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif drw_cir(hand_max, sycen, sxcen, fonthw) int hand_max; int sycen; int sxcen; int fonthw; {     int x,y,r;     char c;     for(r=0;r<60;r++){         x=cos(r*M_PI/180*6)*hand_max*fonthw+sxcen;         y=sin(r*M_PI/180*6)*han...

Programmers break time.

Image

Loading...

Image

Geek time?

Image

Do you know what time it is?

Image
Couple of simple command line clocks. Couple of simple clocks. Great for giving an old pc something to do for grins. Actually I was running these two programs from the nslu2 arm based unit running debian linux. To install: $ sudo apt-get install sysvbanner figlet If your system does not have figlet you can get it from the web. $ wget ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz $ tar zxvf  figlet-2.2.5.tar.gz $ cd figlet-2.2.5/ $ make $ sudo make install Usage: watch -tn 1 date +%T \|figlet -c or watch -t -n 1 "date +%T | xargs banner"