|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^4: The most precise second (timer)by tukusejssirs (Beadle) |
| on Nov 26, 2019 at 22:42 UTC ( [id://11109291]=note: print w/replies, xml ) | Need Help?? |
|
This one looks promising. :) It is less punctual than the original code I posted, but I might do. But I got something strange when I replaced time() in my original code with gettimeofday: exactly precise seconds (to 5 decimal places). I am not quite sure if that is actually correct–is that just calculated to be precise or it the measurement actually precise? I believe that my measurements are not as precise as yours. :) I tried to simplify the test using my $w2 = EV::periodic( 0, 1, 0, sub { print gettimeofday, "\n";} );, but the result was quite unprecise; here’s the output:
Do I do something wrong? Anyway, I use chrony, too, but my original timer function (from time to time) still complains about negative time not invented yet. Although, I use default settings of CentOS 7 for chrony–do I need to adjust something to use those smooth adjustments?
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||