MooseX::Role::Timer(3pm) User Contributed Perl Documentation MooseX::Role::Timer(3pm)NAME
MooseX::Role::Timer - Measure times with your object.
SYNOPSIS
package Demo;
use Moose; # or Any::Moose
with 'MooseX::Role::Timer';
sub BUILD {
shift->start_timer("build");
}
sub do_something {
my $self = shift;
$self->start_timer("something");
# do something...
$self->stop_timer("something");
}
package main;
my $demo = Demo->new;
$demo->do_something;
$demo->do_something;
printf "%3.6fs
", $demo->elapsed_timer("build"); # time spent since BUILD
printf "%3.6fs
", $demo->elapsed_timer("something"); # time spent in sub do_something
This Role provides your object with timers, making it easier to keep track of how long whatever actions take.
start_timer($name)
Start timer $name.
stop_timer($name)
Stop timer $name. Could be started again to cumulatively measure time.
reset_timer($name)
Stops timer $name and clears cumulated times for $name.
elapsed_timer('name')
Return the elapsed time in seconds (cumulated) for timer $name.
timer_names
Return all timer names.
AUTHOR
Michael Langner, "<mila at cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-moosex-role-timer at rt.cpan.org", or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Role-Timer <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Role-Timer>. I
will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT & LICENSE
Copyright 2010 Michael Langner, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-02 MooseX::Role::Timer(3pm)
Check Out this Related Man Page
MooseX::Declare::Syntax::Keyword::Role(3pm) User Contributed Perl Documentation MooseX::Declare::Syntax::Keyword::Role(3pm)NAME
MooseX::Declare::Syntax::Keyword::Role - Role declarations
METHODS
generate_export
CodeRef Object->generate_export ()
Returns a closure with a call to "make_anon_metaclass".
CONSUMES
o MooseX::Declare::Syntax::MooseSetup
o MooseX::Declare::Syntax::RoleApplication
MODIFIED METHODS
imported_moose_symbols
List Object->imported_moose_symbols ()
Extends the existing "imported_moose_symbols" in MooseX::Declare::Syntax::MooseSetup with "requires", "extends", "has", "inner" and
"super".
import_symbols_from
Str Object->import_symbols_from ()
Will return Moose::Role instead of the default Moose.
make_anon_metaclass
Object Object->make_anon_metaclass ()
This will return an anonymous instance of Moose::Meta::Role.
SEE ALSO
o MooseX::Declare
o MooseX::Declare::Syntax::Keyword::Class
o MooseX::Declare::Syntax::RoleApplication
o MooseX::Declare::Syntax::MooseSetup
AUTHOR
Florian Ragwitz <rafl@debian.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2008 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.18.2 2013-12-14 MooseX::Declare::Syntax::Keyword::Role(3pm)
hello all
since a process running in kernel mode cannnot be preempted by any other process what would be the status of Timer interrupt that occurs when the time quantum of a process is elapsed?
thanks (2 Replies)
hi,
i tried the following source codes:
fork1.c:
main()
{
printf("demo of fork\n");
fork();
printf("hello");
}
output:
demo of fork
hello hello
fork2.c:
main()
{
printf("demo of fork"); (0 Replies)
How do you set timer as output to the command line so that you get an output like
Has been waiting for 5 seconds
Has been waiting for 6 seconds
...
Where only the number changes. (2 Replies)
Hi!
I created a group HACKERS and made the user "demo" its member.
$ id demo
uid=500(demo) gid=500(demo) groups=500(demo),502(HACKERS)
$
Next, I granted read and execute permissions to the group "HACKERS" on /var/log/httpd as shown below:
setfacl -m "g:HACKERS:r-x"... (2 Replies)
Hey,
Now that I'm caught-up on a number of forum tasks, I can turn my attention to the next-generation UserCP (and learn VueJS) for the site.
Today I created this (not yet functional) demo using Vue;
https://www.unix.com/cp/index.php
What do you think? (36 Replies)
Hello. I am pretty new to unix and shell scripting and I was wondering if there might be a way to banner a countdown timer inside a script. We currently have an existing script that does a 2 minute sleep but thought it might be fun to actually make it banner a countdown timer until it is finished.... (3 Replies)