Support reporting current time in selftest output.
[ira/wip.git] / selftest / output / subunit.pm
index 720fe7285cc09d3f47eeadbf1e5452cffd926740..e99b76c1b9d3c1a287c2f3f57ddc1ebba587653a 100644 (file)
@@ -33,6 +33,13 @@ sub new($) {
        bless($self, $class);
 }
 
        bless($self, $class);
 }
 
+sub report_time($$)
+{
+       my ($self, $time) = @_;
+       my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time);
+       printf "time: %04d-%02d-%02d %02d:%02d:%02dZ\n", $year+1900, $mon, $mday, $hour, $min, $sec;
+}
+
 sub start_testsuite($$)
 {
        my ($self, $name) = @_;
 sub start_testsuite($$)
 {
        my ($self, $name) = @_;