Questions tagged [time-hires]
4 questions
7
votes
2 answers
Why does Time::HiRes::stat break list subscripting?
I can't figure out what's going on here. Where does the 8 below come from?
Time::HiRes provides an overload of stat which expands the times to have high-resolution (which is supported on my system).
$ perl -MTime::HiRes -e 'print…

derobert
- 49,731
- 15
- 94
- 124
1
vote
1 answer
Perl - "utime" is not exported by the Time::HiRes module
Getting this error when adding statement
use Time::HiRes qw( utime );
According to Time::HiRes perldoc it should be there, but it's not (looked in HiRes.pm). Does anybody know why? I am using perl 5.24.0, checked on several platforms (unix,…

AndyH
- 383
- 1
- 8
1
vote
2 answers
Perl Time::HiRes - the best way to replace regular alarm
I need to implement less-than-a-second timeouts in the DBIx::HA package. Having the following code from that module:
my $timeout = 0;
eval {
no strict;
my $h = set_sig_handler(
'ALRM',
sub { $timeout = 1; die 'TIMEOUT'; },
…

a1111exe
- 641
- 4
- 18
1
vote
2 answers
gettimeofday time difference is occasionally negative
I'm writing an Object Oriented OpenGL framework in perl and I'm running into a weird issue when I measure the DeltaTime between each frame. The delta time seems to go negative every once in a while (every ~.5 seconds).
I'm not sure if this is…

Francesco Noferi
- 482
- 7
- 13