[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tee with timestamp
From: |
Emil Obermayr |
Subject: |
tee with timestamp |
Date: |
Fri, 8 Mar 2002 16:19:11 +0100 |
User-agent: |
Mutt/1.2.5i |
Hi,
I just got the idea that it would be a nice feature to log your typing
in tee with timestamps. Maybe you can include this snippet:
while (c = getchar()){
if ((timestamp_new = time (0)) - timestamp > delay){
items = *(localtime(×tamp_new));
fprintf (fp, "\n*** %d:%d:%d ***\n", items.tm_hour, items.tm_min,
items.tm_sec);
timestamp = timestamp_new;
}
fputc (c, fp);
putchar (c);
}
Bye!
--
_/ _/ _/ Emil Obermayr QEDEMOB @ EED/E/P/L
_/ _/ _/ fone +49-5121-707-356 fax: -170
_/ _/ _/ http://www.ericsson.de/fue/standorte/weg_hildesheim.html
_/ _/ _/ Ericsson Eurolab Deutschland GmbH, Hildesheim, Germany
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tee with timestamp,
Emil Obermayr <=