From dc9c46496970ddfea3105adbcdb2e9918b5b77d4 Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 21 Aug 2001 15:28:04 +0000 Subject: time connection label --- perl-install/standalone/net_monitor | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'perl-install/standalone/net_monitor') diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index 9d0985c35..51749dd38 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -76,6 +76,7 @@ my $netcnx = {}; my $netc = {}; my $intf = {}; my $c_time = 0; +my $ct_tag; network::netconnect::load_conf($netcnx, $netc, $intf); network::netconnect::read_net_conf('', $netcnx, $netc); my $combo1 = new Gtk::Combo; @@ -164,6 +165,14 @@ sub connection { $button_close->set_sensitive(0); $statusbar->pop(1); $statusbar->push(1, $isconnected2 ? _("Disconnecting from Internet ") : _("Connecting to Internet ")); + if(!$isconnected2) { + $c_time = time(); + gmtime($_[0]); + $ct_tag = Gtk->timeout_add(1000, sub { + my ($sec,$min,$hour) = gmtime(time() - $c_time); + my $e = sprintf ("%02d:%02d:%02d", $hour, $min, $sec); + $label_ct->set($e); 1; }); + } else { Gtk->timeout_remove($ct_tag) } my $nb_point=1; my $tag = Gtk->timeout_add(100, sub { $statusbar->pop(1); -- cgit v1.2.1