Diff for scripts/perl/syswatcher/syswatcher.pl between version 1.2 and 1.3
| version 1.2, 2003/11/13 17:28:52 |
version 1.3, 2003/11/13 17:57:20 |
|
|
| # 16/10/2003 - added automatic database reconnecting (nepto) |
# 16/10/2003 - added automatic database reconnecting (nepto) |
| # |
# |
| |
|
| # $Platon: scripts/syswatcher/syswatcher.pl,v 1.1 2003/11/10 17:36:57 rajo Exp $ |
# $Platon: scripts/syswatcher/syswatcher.pl,v 1.2 2003/11/13 17:28:52 rajo Exp $ |
| |
|
| use strict; |
use strict; |
| |
|
| use DBI; |
use DBI; |
| use Time::HiRes qw(gettimeofday); |
use Time::HiRes qw(gettimeofday usleep); |
| use POSIX qw(strftime); |
use POSIX qw(strftime); |
| |
|
| # declaration: {{{ |
# declaration: {{{ |
| Line 100 sub PrepareSQL() |
|
| Line 100 sub PrepareSQL() |
|
| sub cur_date() |
sub cur_date() |
| { # {{{ |
{ # {{{ |
| my ($sec, $msec) = Time::HiRes::gettimeofday; |
my ($sec, $msec) = Time::HiRes::gettimeofday; |
| |
$msec = sprintf("%06g", $msec); |
| my $time_string = strftime "%Y/%m/%d %X.$msec", gmtime; |
my $time_string = strftime "%Y/%m/%d %X.$msec", gmtime; |
| |
|
| return $time_string; |
return $time_string; |
Platon Group <platon@platon.org> http://platon.org/
|
|