in reply to Higher resolution $^T?
Interestingly, you can assign to $^T...
perl -le'$^T=42;print($^T)'
I've tested this in Perl 5.6.2, 5.8.9, and 5.20.0 with the same results. However, $^T is quite magic. You can assign a floating point number to it, but it will be rounded to an integer:
perl -le'$^T=42.3;print($^T)'
What's happening there? Well, the floating point number is actually stored correctly in Perl's SV structure. However any fetch will just get the integer instead.
perl -MDevel::Peek -le'$^T=42.3;Dump($^T)'
So even if you wrote a module to capture a more precise time, it couldn't be stored in $^T because that scalar is too magic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Higher resolution $^T?
by ikegami (Patriarch) on Jun 23, 2014 at 02:17 UTC | |
by Tux (Canon) on Jun 23, 2014 at 05:47 UTC |