]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: Add function to compute ISO time in future
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 22 Apr 2010 16:28:02 +0000 (18:28 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:53:44 +0000 (16:53 +0200)
regress/scripts/functions.pm

index 23b5d7fea53ce3166962cea14c96eb75ca57f6f6..76a8fb007c6040081d9fd7a5ea8cfbdbdedf9058 100644 (file)
@@ -40,7 +40,7 @@ our @ISA = qw(Exporter);
 our @EXPORT =  qw(update_some_files create_many_files check_multiple_copies
                   update_client $HOST $BASEPORT add_to_backup_list check_volume_size
                   create_many_dirs cleanup start_bacula stop_bacula get_resource
-                  set_maximum_concurent_jobs
+                  set_maximum_concurent_jobs get_time
                   check_min_volume_size check_max_volume_size $estat $bstat $rstat $zstat
                   $cwd $bin $scripts $conf $rscripts $tmp $working extract_resource
                   $db_name $db_user $db_password $src $tmpsrc);
@@ -443,4 +443,11 @@ sub check_multiple_copies
     exit $ret;
 }
 
+use POSIX qw/strftime/;
+sub get_time
+{
+    my ($sec) = @_;
+    print strftime('%F %T', localtime(time+$sec)), "\n";
+}
+
 1;