File | /usr/local/lib/perl5/site_perl/5.10.1/DateTime/TimeZone/UTC.pm |
Statements Executed | 275 |
Statement Execution Time | 836µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
54 | 2 | 2 | 269µs | 269µs | new | DateTime::TimeZone::UTC::
92 | 2 | 1 | 90µs | 90µs | is_utc | DateTime::TimeZone::UTC::
37 | 1 | 1 | 49µs | 49µs | offset_for_local_datetime | DateTime::TimeZone::UTC::
24 | 1 | 1 | 41µs | 41µs | offset_for_datetime | DateTime::TimeZone::UTC::
1 | 1 | 1 | 14µs | 17µs | BEGIN@3 | DateTime::TimeZone::UTC::
1 | 1 | 1 | 6µs | 42µs | BEGIN@9 | DateTime::TimeZone::UTC::
1 | 1 | 1 | 6µs | 24µs | BEGIN@5 | DateTime::TimeZone::UTC::
1 | 1 | 1 | 4µs | 4µs | BEGIN@8 | DateTime::TimeZone::UTC::
0 | 0 | 0 | 0s | 0s | category | DateTime::TimeZone::UTC::
0 | 0 | 0 | 0s | 0s | is_dst_for_datetime | DateTime::TimeZone::UTC::
0 | 0 | 0 | 0s | 0s | short_name_for_datetime | DateTime::TimeZone::UTC::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package DateTime::TimeZone::UTC; | ||||
2 | |||||
3 | 3 | 23µs | 2 | 20µs | # spent 17µs (14+3) within DateTime::TimeZone::UTC::BEGIN@3 which was called
# once (14µs+3µs) by DateTime::TimeZone::OffsetOnly::BEGIN@11 at line 3 # spent 17µs making 1 call to DateTime::TimeZone::UTC::BEGIN@3
# spent 3µs making 1 call to strict::import |
4 | |||||
5 | 3 | 26µs | 2 | 41µs | # spent 24µs (6+18) within DateTime::TimeZone::UTC::BEGIN@5 which was called
# once (6µs+18µs) by DateTime::TimeZone::OffsetOnly::BEGIN@11 at line 5 # spent 24µs making 1 call to DateTime::TimeZone::UTC::BEGIN@5
# spent 18µs making 1 call to vars::import |
6 | 1 | 400ns | $VERSION = 0.01; | ||
7 | |||||
8 | 3 | 20µs | 1 | 4µs | # spent 4µs within DateTime::TimeZone::UTC::BEGIN@8 which was called
# once (4µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@11 at line 8 # spent 4µs making 1 call to DateTime::TimeZone::UTC::BEGIN@8 |
9 | 3 | 106µs | 2 | 42µs | # spent 42µs (6+36) within DateTime::TimeZone::UTC::BEGIN@9 which was called
# once (6µs+36µs) by DateTime::TimeZone::OffsetOnly::BEGIN@11 at line 9 # spent 42µs making 1 call to DateTime::TimeZone::UTC::BEGIN@9
# spent 36µs making 1 call to base::import, recursion: max depth 1, time 36µs |
10 | |||||
11 | # spent 269µs within DateTime::TimeZone::UTC::new which was called 54 times, avg 5µs/call:
# 44 times (231µs+0s) by DateTime::TimeZone::new at line 56 of DateTime/TimeZone.pm, avg 5µs/call
# 10 times (39µs+0s) by DateTime::TimeZone::OffsetOnly::new at line 26 of DateTime/TimeZone/OffsetOnly.pm, avg 4µs/call | ||||
12 | 54 | 30µs | my $class = shift; | ||
13 | |||||
14 | 54 | 276µs | return bless { name => 'UTC' }, $class; | ||
15 | } | ||||
16 | |||||
17 | sub is_dst_for_datetime {0} | ||||
18 | |||||
19 | 24 | 63µs | # spent 41µs within DateTime::TimeZone::UTC::offset_for_datetime which was called 24 times, avg 2µs/call:
# 24 times (41µs+0s) by DateTime::offset at line 905 of DateTime.pm, avg 2µs/call | ||
20 | 37 | 89µs | # spent 49µs within DateTime::TimeZone::UTC::offset_for_local_datetime which was called 37 times, avg 1µs/call:
# 37 times (49µs+0s) by DateTime::_offset_for_local_datetime at line 908 of DateTime.pm, avg 1µs/call | ||
21 | |||||
22 | sub short_name_for_datetime {'UTC'} | ||||
23 | |||||
24 | sub category {undef} | ||||
25 | |||||
26 | 92 | 201µs | # spent 90µs within DateTime::TimeZone::UTC::is_utc which was called 92 times, avg 984ns/call:
# 54 times (39µs+0s) by DateTime::_calc_local_rd at line 379 of DateTime.pm, avg 717ns/call
# 38 times (52µs+0s) by DateTime::_calc_utc_rd at line 338 of DateTime.pm, avg 1µs/call | ||
27 | |||||
28 | 1 | 3µs | 1; | ||
29 | |||||
30 | __END__ | ||||
31 | |||||
32 | =head1 NAME | ||||
33 | |||||
34 | DateTime::TimeZone::UTC - The UTC time zone | ||||
35 | |||||
36 | =head1 SYNOPSIS | ||||
37 | |||||
38 | my $utc_tz = DateTime::TimeZone::UTC->new; | ||||
39 | |||||
40 | =head1 DESCRIPTION | ||||
41 | |||||
42 | This class is used to provide the DateTime::TimeZone API needed by | ||||
43 | DateTime.pm for the UTC time zone, which is not explicitly included in | ||||
44 | the Olson time zone database. | ||||
45 | |||||
46 | The offset for this object will always be zero. | ||||
47 | |||||
48 | =head1 USAGE | ||||
49 | |||||
50 | This class has the same methods as a real time zone object, but the | ||||
51 | C<category()> method returns undef and C<is_utc()> returns true. | ||||
52 | |||||
53 | =head1 AUTHOR | ||||
54 | |||||
55 | Dave Rolsky, <autarch@urth.org> | ||||
56 | |||||
57 | =head1 COPYRIGHT & LICENSE | ||||
58 | |||||
59 | Copyright (c) 2003-2008 David Rolsky. All rights reserved. This | ||||
60 | program is free software; you can redistribute it and/or modify it | ||||
61 | under the same terms as Perl itself. | ||||
62 | |||||
63 | The full text of the license can be found in the LICENSE file included | ||||
64 | with this module. | ||||
65 | |||||
66 | =cut |