| File | /usr/local/lib/perl5/site_perl/5.10.1/DateTime/TimeZone/Floating.pm |
| Statements Executed | 44 |
| Statement Execution Time | 310µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 9 | 1 | 1 | 90µs | 90µs | DateTime::TimeZone::Floating::new |
| 12 | 5 | 1 | 14µs | 14µs | DateTime::TimeZone::Floating::is_floating |
| 1 | 1 | 1 | 13µs | 16µs | DateTime::TimeZone::Floating::BEGIN@3 |
| 1 | 1 | 1 | 8µs | 998µs | DateTime::TimeZone::Floating::BEGIN@9 |
| 1 | 1 | 1 | 7µs | 7µs | DateTime::TimeZone::Floating::BEGIN@8 |
| 1 | 1 | 1 | 7µs | 37µs | DateTime::TimeZone::Floating::BEGIN@5 |
| 0 | 0 | 0 | 0s | 0s | DateTime::TimeZone::Floating::STORABLE_thaw |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package DateTime::TimeZone::Floating; | ||||
| 2 | |||||
| 3 | 3 | 25µs | 2 | 19µs | # spent 16µs (13+3) within DateTime::TimeZone::Floating::BEGIN@3 which was called
# once (13µs+3µs) by DateTime::TimeZone::BEGIN@11 at line 3 # spent 16µs making 1 call to DateTime::TimeZone::Floating::BEGIN@3
# spent 3µs making 1 call to strict::import |
| 4 | |||||
| 5 | 3 | 26µs | 2 | 67µs | # spent 37µs (7+30) within DateTime::TimeZone::Floating::BEGIN@5 which was called
# once (7µs+30µs) by DateTime::TimeZone::BEGIN@11 at line 5 # spent 37µs making 1 call to DateTime::TimeZone::Floating::BEGIN@5
# spent 30µs making 1 call to vars::import |
| 6 | 1 | 300ns | $VERSION = 0.01; | ||
| 7 | |||||
| 8 | 3 | 24µs | 1 | 7µs | # spent 7µs within DateTime::TimeZone::Floating::BEGIN@8 which was called
# once (7µs+0s) by DateTime::TimeZone::BEGIN@11 at line 8 # spent 7µs making 1 call to DateTime::TimeZone::Floating::BEGIN@8 |
| 9 | 3 | 107µs | 2 | 1.99ms | # spent 998µs (8+990) within DateTime::TimeZone::Floating::BEGIN@9 which was called
# once (8µs+990µs) by DateTime::TimeZone::BEGIN@11 at line 9 # spent 998µs making 1 call to DateTime::TimeZone::Floating::BEGIN@9
# spent 990µs making 1 call to base::import |
| 10 | |||||
| 11 | # spent 90µs within DateTime::TimeZone::Floating::new which was called 9 times, avg 10µs/call:
# 9 times (90µs+0s) by DateTime::TimeZone::new at line 48 of DateTime/TimeZone.pm, avg 10µs/call | ||||
| 12 | 18 | 94µs | my $class = shift; | ||
| 13 | |||||
| 14 | return bless { | ||||
| 15 | name => 'floating', | ||||
| 16 | offset => 0 | ||||
| 17 | }, $class; | ||||
| 18 | } | ||||
| 19 | |||||
| 20 | 12 | 32µs | # spent 14µs within DateTime::TimeZone::Floating::is_floating which was called 12 times, avg 1µs/call:
# 4 times (7µs+0s) by DateTime::_calc_utc_rd at line 338 of DateTime.pm, avg 2µs/call
# 4 times (3µs+0s) by DateTime::_calc_local_rd at line 379 of DateTime.pm, avg 750ns/call
# 2 times (2µs+0s) by DateTime::_handle_offset_modifier at line 275 of DateTime.pm, avg 950ns/call
# once (2µs+0s) by DateTime::_compare at line 1803 of DateTime.pm
# once (600ns+0s) by DateTime::set_time_zone at line 1944 of DateTime.pm | ||
| 21 | |||||
| 22 | sub STORABLE_thaw { | ||||
| 23 | my $self = shift; | ||||
| 24 | my $cloning = shift; | ||||
| 25 | my $serialized = shift; | ||||
| 26 | |||||
| 27 | my $class = ref $self || $self; | ||||
| 28 | |||||
| 29 | my $obj; | ||||
| 30 | if ( $class->isa(__PACKAGE__) ) { | ||||
| 31 | $obj = __PACKAGE__->new(); | ||||
| 32 | } | ||||
| 33 | else { | ||||
| 34 | $obj = $class->new(); | ||||
| 35 | } | ||||
| 36 | |||||
| 37 | %$self = %$obj; | ||||
| 38 | |||||
| 39 | return $self; | ||||
| 40 | } | ||||
| 41 | |||||
| 42 | 1 | 3µs | 1; | ||
| 43 | |||||
| 44 | __END__ | ||||
| 45 | |||||
| 46 | =head1 NAME | ||||
| 47 | |||||
| 48 | DateTime::TimeZone::Floating - A time zone that is always local | ||||
| 49 | |||||
| 50 | =head1 SYNOPSIS | ||||
| 51 | |||||
| 52 | my $floating_tz = DateTime::TimeZone::Floating->new; | ||||
| 53 | |||||
| 54 | =head1 DESCRIPTION | ||||
| 55 | |||||
| 56 | This class is used to provide the DateTime::TimeZone API needed by | ||||
| 57 | DateTime.pm, but for floating times, as defined by the RFC 2445 spec. | ||||
| 58 | A floating time has no time zone, and has an effective offset of zero. | ||||
| 59 | |||||
| 60 | =head1 USAGE | ||||
| 61 | |||||
| 62 | This class has the same methods as a real time zone object, but the | ||||
| 63 | C<short_name_for_datetime()>, and C<category()> methods both return | ||||
| 64 | undef. | ||||
| 65 | |||||
| 66 | =head1 AUTHOR | ||||
| 67 | |||||
| 68 | Dave Rolsky, <autarch@urth.org> | ||||
| 69 | |||||
| 70 | =head1 COPYRIGHT & LICENSE | ||||
| 71 | |||||
| 72 | Copyright (c) 2003-2008 David Rolsky. All rights reserved. This | ||||
| 73 | program is free software; you can redistribute it and/or modify it | ||||
| 74 | under the same terms as Perl itself. | ||||
| 75 | |||||
| 76 | The full text of the license can be found in the LICENSE file included | ||||
| 77 | with this module. | ||||
| 78 | |||||
| 79 | =cut |