Changeset 65336e0fe19c6ca674b0457ed254927d507e4fca
- Timestamp:
- 09/04/09 14:23:22
(4 years ago)
- Author:
- Mark Harrison <mark@omniti.com>
- git-committer:
- Mark Harrison <mark@omniti.com> 1252074202 +0000
- git-parent:
[7a0ad41bb3ce9260cc3136a0afcdfaddbffb60b9]
- git-author:
- Mark Harrison <mark@omniti.com> 1252074202 +0000
- Message:
Formatting fixes and remove a debugging line
git-svn-id: https://labs.omniti.com/resmon/trunk@211 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rae22e3b |
r65336e0 |
|
| 16 | 16 | ######################### |
|---|
| 17 | 17 | sub splittime { |
|---|
| 18 | | my ($val,@list) = @_; |
|---|
| 19 | | my @rv; |
|---|
| | 18 | my ($val,@list) = @_; |
|---|
| | 19 | my @rv; |
|---|
| 20 | 20 | |
|---|
| 21 | | $val = abs($val); |
|---|
| 22 | | foreach my $factor (@list){ |
|---|
| 23 | | push @rv,$val%$factor; |
|---|
| 24 | | $val/=$factor; |
|---|
| 25 | | } |
|---|
| 26 | | push @rv,int($val); |
|---|
| 27 | | return @rv; |
|---|
| | 21 | $val = abs($val); |
|---|
| | 22 | foreach my $factor (@list){ |
|---|
| | 23 | push @rv,$val%$factor; |
|---|
| | 24 | $val/=$factor; |
|---|
| | 25 | } |
|---|
| | 26 | push @rv,int($val); |
|---|
| | 27 | return @rv; |
|---|
| 28 | 28 | } |
|---|
| 29 | 29 | ######################### |
|---|
| … | … | |
| 41 | 41 | if(/LOG: restored log file/) { |
|---|
| 42 | 42 | ($year,$month,$day,$hour,$min) = ( $_ =~ /^(\d\d\d\d)-(\d\d)-(\d\d)\s(\d+):(\d+)/ ); |
|---|
| 43 | | $moo = 'moo'; |
|---|
| 44 | 43 | } |
|---|
| 45 | 44 | } |
|---|
| … | … | |
| 58 | 57 | if ($diff > 3600) |
|---|
| 59 | 58 | { |
|---|
| 60 | | return "BAD($diff seconds behind)"; |
|---|
| | 59 | return "BAD($diff seconds behind)"; |
|---|
| 61 | 60 | } else { |
|---|
| 62 | | return "OK($diff seconds behind)"; |
|---|
| | 61 | return "OK($diff seconds behind)"; |
|---|
| 63 | 62 | } |
|---|
| 64 | 63 | } |
|---|