#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw( clock_gettime clock_getres );
my $realtime = clock_gettime('CLOCK_REALTIME');
my $resolution = clock_getres('CLOCK_REALTIME');
print "Realtime: ".$realtime."\n";
print "Resolution: ".$resolution."\n";
####
Argument "CLOCK_REALTIME" isn't numeric in subroutine entry at test.pl line 6.
Argument "CLOCK_REALTIME" isn't numeric in subroutine entry at test.pl line 7.
Realtime: 1411038919.69833
Resolution: 1e-09
####
#!/usr/bin/perl
use strict;
use warnings;
use Time::HiRes qw( clock_gettime clock_getres );
my $realtime = clock_gettime(CLOCK_REALTIME);
my $resolution = clock_getres(CLOCK_REALTIME);
print "Realtime: ".$realtime."\n";
print "Resolution: ".$resolution."\n";
####
Bareword "CLOCK_REALTIME" not allowed while "strict subs" in use at test.pl line 6.
Bareword "CLOCK_REALTIME" not allowed while "strict subs" in use at test.pl line 7.
Execution of test.pl aborted due to compilation errors.