I glanced at the SQLite docs, and I couldn't find anything.
Does it matter where it spent its time, as long as you know how long it took? Because you can get a quite high resolution timestamp out of Time::HiRes, and just calculate the differences.
#! perl -w
use Time::HiRes qw(gettimeofday);
use Time::HiRes qw(sleep); # for this demo only
my @t = scalar gettimeofday;
sleep 3.1415926;
push @t, scalar gettimeofday;
printf "Total time wasted: %.3f seconds\n", $t[-1]-$t[0];
The array
@ serves two purposes: A) it stores the time measurements in a single variable (you can always use two scalars); and B) you can use it to add intermediate time markers, for more detailed reporting.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.