NAME
OP::TimeSpan
VERSION
$Id: //depotit/tools/snitchd/OP-0.20/lib/OP/TimeSpan.pm#1 $
SYNOPSIS
use OP::TimeSpan;
my $time = OP::TimeSpan->new( 60*5 );
DESCRIPTION
Time range object. Represents a number of seconds.
Extends OP::Object, Time::Seconds.
Stringifies as number of seconds unless overridden.
PUBLIC CLASS METHODS
assert(OP::Class $class: *@rules)
Returns a new OP::Type::TimeSpan instance which encapsulates the received OP::Subtype rules.
create "OP::Example" => { someTime => OP::TimeSpan->assert(optional()), # ... };
new(OP::Class $class: Num $secs)
Returns a new OP::TimeSpan instance which encapsulates the received value.
my $object = OP::TimeSpan->new($secs);
SEE ALSO
See the Time::Seconds module for time formatting and manipulation methods inherited by this class.
This file is part of OP.