Subject: | tv_interval() 1st argument should be an array |
Date: | Sat, 9 Jun 2018 12:54:51 -0400 |
To: | bug-Time-HiRes [...] rt.cpan.org |
From: | Alex Hautequest <hquest [...] gmail.com> |
root@darkstar:~# perl -v
This is perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-thread-multi
Copyright 1987-2018, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root@darkstar:~# more test.pl
#!/usr/bin/perl
use Time::Local;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval );
my ($tc_event) = @_;
$tc_current_time = [gettimeofday];
$tc_elapsed_time = tv_interval( $tc_last_time, $tc_current_time );
root@darkstar:~# ./test.pl
tv_interval() 1st argument should be an array reference at ./test.pl line 7.
According to the manual, it should be a string.