diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-11-12 01:24:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-11-12 01:24:39 +0000 |
commit | 7d8f11b58764859230367055deda3489fc09412f (patch) | |
tree | 6961a38d59d54670c8e1d942dbef44449c18a9c1 /perl-install/common.pm | |
parent | 855cc85f5558115010b9629246b014b83fcfe2c3 (diff) | |
download | drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.gz drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.bz2 drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.tar.xz drakx-backup-do-not-use-7d8f11b58764859230367055deda3489fc09412f.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index 4a15ebef9..2067b624c 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -9,7 +9,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int common => [ qw(__ even odd min max sqr sum and_ or_ sign product bool invbool listlength bool2text text2bool to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash add2hash_ set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX formatLines deref) ], functional => [ qw(fold_left compose map_index grep_index map_each grep_each map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ], file => [ qw(dirname basename touch all glob_ cat_ output symlinkf chop_ mode typeFromMagic) ], - system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file) ], + system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableRam availableMemory removeXiBSuffix template2file formatTime) ], constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -447,6 +447,12 @@ sub removeXiBSuffix($) { $_; } +sub formatTime($) { + my ($s, $m, $h) = gmtime($_[0]); + sprintf "%02d:%02d:%02d", $h, $m, $s; +} + + #-###################################################################################### #- Wonderful perl :( #-###################################################################################### |