Clocks: Was: Ugly Ugly BeBox 
Author Message
 Clocks: Was: Ugly Ugly BeBox

[...funny stuff about clocks deleted...]
>At work a utility on the screen tells me the time; if I could find one
>that just told me how long I'd been here, I'd be happier.

Use tclX/Tk !,
send the following to your favorite "wishx":
label .l1 -text "You've been here since:"
label .l2
label .l3
pack .l1 .l2 .l3

set start [getclock]
while 1 {
  set diff [expr [getclock]-$start];
  set h  [expr $diff/3600];
  set m  [expr ($diff-$h*3600)/60];
  .l2 config -text "$diff seconds, or";
  .l3 config -text "[format %02d $h] hours and [format %02d $m] minutes";
  sleep 1;


(pure Tk one (that is without getclock nor sleep) left as an
exercise etc...)


ps 1: yes Tcl/Tk is available on MacOs, Winblows... beside unixes.
      When for BeOs?
ps 2: followup set to comp.lang.tcl which seems more appropriate :-)

Laurent Demailly * http://www.*-*-*.com/ ~dl/ * Linux|PGP|Gnu|Tcl|...  Freedom
Prime#1: cent cinq mille cent cinq milliards cent cinq mille cent soixante sept

Fri, 15 May 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. D5.1.1 Bug -- The Save as Ugly Name Blues

2. What makes you write ugly Smalltalk?

3. The Good, the Bad, the Ugly, and the

4. Ugly font in VW7.0 on Windows 98

5. Error Messages: The Good, the Bad, and the Ugly

6. What makes you write ugly Smalltalk code (again) ?

7. ugly-- this oughta be a bug

8. Ugly Buttons - I need nice ones

9. Ugly to pretty html?

10. ugly problem with memo file pointers going awry

11. Neil Bawd's ugly home page is back

12. Neil Bawd's Ugly Home Page 2002


Powered by phpBB® Forum Software