view release on metacpan or search on metacpan
lib/App/FromUnixtime.pm view on Meta::CPAN
use strict;
use warnings;
use Getopt::Long qw/GetOptionsFromArray/;
use IO::Interactive::Tiny;
use POSIX qw/strftime/;
use Config::CmdRC qw/.from_unixtimerc/;
use Exporter 'import';
our @EXPORT = qw/from_unixtime/;
our $VERSION = '0.17';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GUI/Harmonograph/Compute/Drawing.pm view on Meta::CPAN
push @code, '$Cr /= (($max_xr > $max_yr) ? $max_xr : $max_yr)'; # zoom out so everything is visible
push @code, @init_var_code, 'my ($x, $y)';
push @code, 'my ($x_old, $y_old)','my $line_broke = 1' if $set->{'visual'}{'connect_dots'};
push @code, '$dc->SetPen( Wx::Pen->new( shift @wx_colors, $pen_size, $pen_style ) )',
'my $first_color = shift @colors';
push @code, 'my $color_timer = 0' if $color_swap_time;
push @code, 'for my $i (1 .. $dot_count){';
if ($color_swap_time){
push @code, ' if ($color_timer++ == $color_swap_time){', ' $color_timer = 1',
' $dc->SetPen( Wx::Pen->new( shift @wx_colors, $pen_size, $pen_style) )';
push @code, ' $progress_bar->add_percentage( ($i/ $dot_count*100), [(shift @colors)->values] )' unless defined $sketch;
push @code, ' }';
}
push @code, @compute_coor_code, @update_var_code;
view all matches for this distribution
view release on metacpan or search on metacpan
Added test for non-unique POM version (Ivan Wills)
Converted git-pom (Ivan Wills)
Changed the order of mock set up (Ivan Wills)
Added missing modules (Ivan Wills)
More tests (Ivan Wills)
Removed timer code (Ivan Wills)
Added JSON out put test (Ivan Wills)
Switched to usign explain, added pre-processing STDOUT option and added ability to skip a test if a module isn't installed (Ivan Wills)
Fixed remaining runner uses (Ivan Wills)
More tests (Ivan Wills)
Converted git-up-to-date (Ivan Wills)
Started implementing (Ivan Wills)
New script to clean up old branches (Ivan Wills)
Added dieing if not POM versions found (Ivan Wills)
Added more logic to help with getting POM versions (Ivan Wills)
Changed settings to use one file per repo (Ivan Wills)
Added timer to find what git commands take time (Ivan Wills)
Added the ability to set MAX_AGE via git config (Ivan Wills)
Added more optomisations (Ivan Wills)
Changed to use repo URL as the settings key and added dieing if the settings were created by a newer version (Ivan Wills)
Added optomisation to not find branches that own a sha (Ivan Wills)
Added storing found branch settings so they don't need to be looked up again (Ivan Wills)
view all matches for this distribution
view release on metacpan or search on metacpan
share/jtca-katakana-guide-3.pl view on Meta::CPAN
ã¾ã¼ã³ zone ï¼ï¼ï¼
ã¿ã¤ãã« title ï¼ï¼ï¼
ã¿ã¤ããã§ã¼ã¹ typefaces ï¼ï¼ï¼ãï¼ï¼ï¼
ã¿ã¤ãã©ã¤ã¿ã¼ typewriter ï¼ï¼ï¼
ã¿ã¤ãã°ã©ãã£ã¼ typography ï¼ï¼ï¼ãï¼ï¼ï¼
ã¿ã¤ãã¼ timer ï¼ï¼ï¼ãï¼ï¼ï¼
ã¿ã¤ãã³ã° timing ï¼ï¼ï¼
ã¿ã¤ã time ï¼ï¼ï¼
ã¿ã¤ã ã©ã¤ã³ timeline ï¼ï¼ï¼
ã¿ã¤ã¤ tire ï¼ï¼ï¼ãï¼ï¼ï¼
ã¿ã¼ã²ãã target ï¼ï¼ï¼
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Greple/wordle/word_all.pm view on Meta::CPAN
tibia
tidal
tiger
tight
tilde
timer
timid
tipsy
titan
tithe
title
view all matches for this distribution
view release on metacpan or search on metacpan
Set alert parameter for large file. **Greple** scans whole file
content to know line borders, and it takes several seconds or more if
it contains large number of lines.
By default, if the target file contains more than **512 \* 1024
characters** (_size_), **2 seconds** timer will start (_time_). Alert
message is shown when the timer expired.
To disable this alert, set the size as zero:
--alert size=0
view all matches for this distribution
view release on metacpan or search on metacpan
examples/DelayRequest.pm view on Meta::CPAN
return;
}
}
weaken(my $wself = $self);
$self->{delayed} = $self->{factory_args}{eventlib}->timer(
$self->{factory_args}{delay} || 0.5,
sub {
# pass thru everything
$wself or return;
$wself->{delayed} = undef;
view all matches for this distribution
view release on metacpan or search on metacpan
my $total = 0;
my $cur = 0;
my $show_progress = 1;
my $xdev_fsno;
my @edb_files;
my $timer;
my $incoming_dir;
my $read_size;
my ( $find_ref, $find_db_write );
my $hashl;
}
$cur++;
if ($show_progress) {
print STDERR $timer->report(
"\r\e[2KScanning directory: %p done, %L elapsed, %E remaining",
$cur, );
}
&{$code}( $file, $path );
return;
}
find( \&get_total, $dir );
$timer = Time::Progress->new();
$timer->attr(
min => 1,
max => $total,
);
return;
view all matches for this distribution
view release on metacpan or search on metacpan
share/static/jquery-1.4.2.js view on Meta::CPAN
}
});
var elemdisplay = {},
rfxtypes = /toggle|show|hide/,
rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
timerId,
fxAttrs = [
// height animations
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
// width animations
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
share/static/jquery-1.4.2.js view on Meta::CPAN
return true;
});
},
stop: function( clearQueue, gotoEnd ) {
var timers = jQuery.timers;
if ( clearQueue ) {
this.queue([]);
}
this.each(function() {
// go in reverse order so anything added to the queue during the loop is ignored
for ( var i = timers.length - 1; i >= 0; i-- ) {
if ( timers[i].elem === this ) {
if (gotoEnd) {
// force the next step to be the last
timers[i](true);
}
timers.splice(i, 1);
}
}
});
// start the next in the queue if the last step wasn't forced
share/static/jquery-1.4.2.js view on Meta::CPAN
swing: function( p, n, firstNum, diff ) {
return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
}
},
timers: [],
fx: function( elem, options, prop ) {
this.options = options;
this.elem = elem;
this.prop = prop;
share/static/jquery-1.4.2.js view on Meta::CPAN
return self.step(gotoEnd);
}
t.elem = this.elem;
if ( t() && jQuery.timers.push(t) && !timerId ) {
timerId = setInterval(jQuery.fx.tick, 13);
}
},
// Simple 'show' function
show: function() {
share/static/jquery-1.4.2.js view on Meta::CPAN
}
};
jQuery.extend( jQuery.fx, {
tick: function() {
var timers = jQuery.timers;
for ( var i = 0; i < timers.length; i++ ) {
if ( !timers[i]() ) {
timers.splice(i--, 1);
}
}
if ( !timers.length ) {
jQuery.fx.stop();
}
},
stop: function() {
clearInterval( timerId );
timerId = null;
},
speeds: {
slow: 600,
fast: 200,
share/static/jquery-1.4.2.js view on Meta::CPAN
}
});
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.animated = function( elem ) {
return jQuery.grep(jQuery.timers, function( fn ) {
return elem === fn.elem;
}).length;
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/js/core/jquery-3.2.1.js view on Meta::CPAN
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof windo...
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var...
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MHFS.pm view on Meta::CPAN
my $TFD_CLOEXEC = 0x80000;
my $TFD_NONBLOCK = 0x800;
sub new {
my ($class, $evp) = @_;
my $timerfd = syscall(SYS_timerfd_create(), _clock_MONOTONIC, $TFD_NONBLOCK | $TFD_CLOEXEC);
$timerfd != -1 or die("failed to create timerfd: $!");
my $timerhandle = IO::Handle->new_from_fd($timerfd, "r");
$timerhandle or die("failed to turn timerfd into a file handle");
my %self = ('timerfd' => $timerfd, 'timerhandle' => $timerhandle);
bless \%self, $class;
$evp->set($self{'timerhandle'}, \%self, POLLIN);
$self{'evp'} = $evp;
return \%self;
}
sub packitimerspec {
my ($times) = @_;
my $it_interval_sec = int($times->{'it_interval'});
my $it_interval_nsec = floor(($times->{'it_interval'} - $it_interval_sec) * 1000000000);
my $it_value_sec = int($times->{'it_value'});
my $it_value_nsec = floor(($times->{'it_value'} - $it_value_sec) * 1000000000);
lib/App/MHFS.pm view on Meta::CPAN
return pack 'qqqq', $it_interval_sec, $it_interval_nsec, $it_value_sec, $it_value_nsec;
}
sub settime_linux {
my ($self, $start, $interval) = @_;
# assume start 0 is supposed to run immediately not try to cancel a timer
$start = ($start > 0.000000001) ? $start : 0.000000001;
my $new_value = packitimerspec({'it_interval' => $interval, 'it_value' => $start});
my $settime_success = syscall(SYS_timerfd_settime(), $self->{'timerfd'}, 0, $new_value,0);
($settime_success == 0) or die("timerfd_settime failed: $!");
}
sub onReadReady {
my ($self) = @_;
my $nread;
my $buf;
while($nread = sysread($self->{'timerhandle'}, $buf, 8)) {
if($nread < 8) {
say "timer hit, ignoring $nread bytes";
next;
}
my $expirations = unpack 'Q', $buf;
say "Linux::Timer there were $expirations expirations";
}
lib/App/MHFS.pm view on Meta::CPAN
if( ! $!{EAGAIN}) {
say "sysread failed with $!";
}
}
$self->{'evp'}->check_timers;
return 1;
};
1;
} # package
}; # eval
lib/App/MHFS.pm view on Meta::CPAN
print "$rc: stopped with signal ". WSTOPSIG( $rc)."\n" if WIFSTOPPED( $rc);
}
sub new {
my ($class) = @_;
my %self = ('poll' => IO::Poll->new(), 'fh_map' => {}, 'timers' => [], 'children' => {}, 'deadchildren' => []);
bless \%self, $class;
$SIG{CHLD} = sub {
while((my $child = waitpid(-1, WNOHANG)) > 0) {
my ($wstatus, $exitcode) = ($?, $?>> 8);
lib/App/MHFS.pm view on Meta::CPAN
$self->{'poll'}->remove($handle);
$self->{'fh_map'}{$handle} = undef;
}
sub _insert_timer {
my ($self, $timer) = @_;
my $i;
for($i = 0; defined($self->{'timers'}[$i]) && ($timer->{'desired'} >= $self->{'timers'}[$i]{'desired'}); $i++) { }
splice @{$self->{'timers'}}, $i, 0, ($timer);
return $i;
}
# all times are relative, is 0 is set as the interval, it will be run every main loop iteration
# return undef in the callback to delete the timer
sub add_timer {
my ($self, $start, $interval, $callback, $id) = @_;
my $current_time = clock_gettime(CLOCK_MONOTONIC);
my $desired = $current_time + $start;
my $timer = { 'desired' => $desired, 'interval' => $interval, 'callback' => $callback };
$timer->{'id'} = $id if(defined $id);
return _insert_timer($self, $timer);
}
sub remove_timer_by_id {
my ($self, $id) = @_;
my $lastindex = scalar(@{$self->{'timers'}}) - 1;
for my $i (0 .. $lastindex) {
next if(! defined $self->{'timers'}[$i]{'id'});
if($self->{'timers'}[$i]{'id'} == $id) {
#say "Removing timer with id: $id";
splice(@{$self->{'timers'}}, $i, 1);
return;
}
}
say "unable to remove timer $id, not found";
}
sub requeue_timers {
my ($self, $timers, $current_time) = @_;
foreach my $timer (@$timers) {
$timer->{'desired'} = $current_time + $timer->{'interval'};
_insert_timer($self, $timer);
}
}
sub check_timers {
my ($self) = @_;
my @requeue_timers;
my $timerhit = 0;
my $current_time = clock_gettime(CLOCK_MONOTONIC);
while(my $timer = shift (@{$self->{'timers'}}) ) {
if($current_time >= $timer->{'desired'}) {
$timerhit = 1;
if(defined $timer->{'callback'}->($timer, $current_time, $self)) { # callback may change interval
push @requeue_timers, $timer;
}
}
else {
unshift @{$self->{'timers'}}, $timer;
last;
}
}
$self->requeue_timers(\@requeue_timers, $current_time);
}
sub do_poll {
my ($self, $loop_interval, $poll) = @_;
my $pollret = $poll->poll($loop_interval);
lib/App/MHFS.pm view on Meta::CPAN
my ($self, $loop_interval) = @_;
my $default_lp_interval = $loop_interval // -1;
my $poll = $self->{'poll'};
for(;;)
{
check_timers($self);
print "do_poll $$";
if($self->{'timers'}) {
say " timers " . scalar(@{$self->{'timers'}}) . ' handles ' . scalar($self->{'poll'}->handles());
}
else {
print "\n";
}
# we don't need to expire until a timer is expiring
if(@{$self->{'timers'}}) {
$loop_interval = $self->{'timers'}[0]{'desired'} - clock_gettime(CLOCK_MONOTONIC);
}
else {
$loop_interval = $default_lp_interval;
}
do_poll($self, $loop_interval, $poll);
lib/App/MHFS.pm view on Meta::CPAN
use feature 'say';
use parent -norequire, 'MHFS::EventLoop::Poll::Base';
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
$self->{'evp_timer'} = MHFS::EventLoop::Poll::Linux::Timer->new($self);
return $self;
};
sub add_timer {
my ($self, $start) = @_;
shift @_;
if($self->SUPER::add_timer(@_) == 0) {
say __PACKAGE__.": add_timer, updating linux timer to $start";
$self->{'evp_timer'}->settime_linux($start, 0);
}
};
sub requeue_timers {
my $self = shift @_;
$self->SUPER::requeue_timers(@_);
my ($timers, $current_time) = @_;
if(@{$self->{'timers'}}) {
my $start = $self->{'timers'}[0]{'desired'} - $current_time;
say __PACKAGE__.": requeue_timers, updating linux timer to $start";
$self->{'evp_timer'}->settime_linux($start, 0);
}
};
sub run {
my ($self, $loop_interval) = @_;
$loop_interval //= -1;
my $poll = $self->{'poll'};
for(;;)
{
print __PACKAGE__.": do_poll LINUX_X86_64 $$";
if($self->{'timers'}) {
say " timers " . scalar(@{$self->{'timers'}}) . ' handles ' . scalar($self->{'poll'}->handles());
}
else {
print "\n";
}
lib/App/MHFS.pm view on Meta::CPAN
next if(defined $settings->{$pluginname}{'enabled'} && (!$settings->{$pluginname}{'enabled'}));
my $plugin = $pluginname->new($settings, \%self);
next if(! $plugin);
foreach my $timer (@{$plugin->{'timers'}}) {
say __PACKAGE__.': adding '.ref($plugin).' timer';
$self{'evp'}->add_timer(@{$timer});
}
if(my $func = $plugin->{'uploader'}) {
say __PACKAGE__.': adding '. ref($plugin) .' uploader';
push (@{$self{'uploaders'}}, $func);
}
lib/App/MHFS.pm view on Meta::CPAN
return MHFS::Promise::FakeException->new(@_);
}
sub handleResolved {
my ($self, $deferred) = @_;
$self->{evp}->add_timer(0, 0, sub {
my $success = $self->{state} == MHFS_PROMISE_SUCCESS;
my $value = $self->{end_value};
if($success && $deferred->{onFulfilled}) {
$value = $deferred->{onFulfilled}($value);
if(ref($value) eq 'MHFS::Promise::FakeException') {
lib/App/MHFS.pm view on Meta::CPAN
$self{'on_read_ready'} = \&want_request_line;
$self{'outheaders'}{'X-MHFS-CONN-ID'} = $client->{'outheaders'}{'X-MHFS-CONN-ID'};
$self{'rl'} = 0;
# we want the request
$client->SetEvents(POLLIN | MHFS::EventLoop::Poll->ALWAYSMASK );
$self{'recvrequesttimerid'} = $client->AddClientCloseTimer($client->{'server'}{'settings'}{'recvrequestimeout'}, $client->{'CONN-ID'}, 1);
return \%self;
}
# on ready ready handlers
sub want_request_line {
lib/App/MHFS.pm view on Meta::CPAN
$self->{'header'}{'_RangeStart'} = $1;
$self->{'header'}{'_RangeEnd'} = ($2 ne '') ? $2 : undef;
}
$self->{'on_read_ready'} = undef;
$self->{'client'}->SetEvents(MHFS::EventLoop::Poll->ALWAYSMASK );
$self->{'client'}->KillClientCloseTimer($self->{'recvrequesttimerid'});
$self->{'recvrequesttimerid'} = undef;
# finally handle the request
foreach my $route (@{$self->{'client'}{'server'}{'routes'}}) {
if($self->{'path'}{'unsafecollapse'} eq $route->[0]) {
$route->[1]($self);
lib/App/MHFS.pm view on Meta::CPAN
bless \%self, $class;
$self{'request'} = MHFS::HTTP::Server::Client::Request->new(\%self);
return \%self;
}
# add a connection timeout timer
sub AddClientCloseTimer {
my ($self, $timelength, $id, $is_requesttimeout) = @_;
weaken($self); #don't allow this timer to keep the client object alive
my $server = $self->{'server'};
say "CCT | add timer: $id";
$server->{'evp'}->add_timer($timelength, 0, sub {
if(! defined $self) {
say "CCT | $id self undef";
return undef;
}
# Commented out as with connection reuse on, Apache 2.4.10 seems sometimes
lib/App/MHFS.pm view on Meta::CPAN
}
sub KillClientCloseTimer {
my ($self, $id) = @_;
my $server = $self->{'server'};
say "CCT | removing timer: $id";
$server->{'evp'}->remove_timer_by_id($id);
}
sub SetEvents {
my ($self, $events) = @_;
$self->{'server'}{'evp'}->set($self->{'sock'}, $self, $events);
lib/App/MHFS.pm view on Meta::CPAN
#say "do_on_data: goto onReadReady inbuf " . length($self->{'inbuf'});
goto &onReadReady;
#return onReadReady($self);
}
else {
say "do_on_data: response and on_read_ready not defined, response by timer or poll?";
}
}
return $res;
}
lib/App/MHFS.pm view on Meta::CPAN
# handle possible existing read data
goto &do_on_data;
}
}
else {
say "response not defined, probably set later by a timer or poll";
}
return 1;
}
sub _TSRReturnPrint {
lib/App/MHFS.pm view on Meta::CPAN
_TSRReturnPrint($sentthiscall);
return undef;
}
if($sret) {
$sentthiscall += $sret;
# if we sent data, kill the send timer
if(defined $client->{'sendresponsetimerid'}) {
$client->KillClientCloseTimer($client->{'sendresponsetimerid'});
$client->{'sendresponsetimerid'} = undef;
}
}
# not all data sent, add timer
if(length($dataitem->{'buf'}) > 0) {
$client->{'sendresponsetimerid'} //= $client->AddClientCloseTimer($client->{'server'}{'settings'}{'sendresponsetimeout'}, $client->{'CONN-ID'});
_TSRReturnPrint($sentthiscall);
return '';
}
#we sent the full buf
lib/App/MHFS.pm view on Meta::CPAN
my ($request) = @_;
return $self->SendArt($request);
}]
];
$self->{'timers'} = [
# update the library at start and periodically
[0, 300, sub {
my ($timer, $current_time, $evp) = @_;
say "$pstart library timer";
UpdateLibrariesAsync($self, $evp, sub {
say "$pstart library timer done";
});
return 1;
}],
];
lib/App/MHFS.pm view on Meta::CPAN
my ($request) = @_;
$self->createTorrent($request);
}],
];
$self->{'timers'} = [
# once an hour evict peers that left the swarm ungracefully
[0, 3600, sub {
my ($timer, $current_time, $evp) = @_;
say __PACKAGE__.": evict peers timer";
foreach my $infohash (keys %{$self->{'torrents'}}) {
foreach my $peer (keys %{$self->{'torrents'}{$infohash}}) {
my $peerdata = $self->{'torrents'}{$infohash}{$peer};
if(($current_time - $peerdata->{'last_announce'}) > ($self->{'announce_interval'}+60)) {
$self->removeTorrentPeer($infohash, $peer, " timeout");
lib/App/MHFS.pm view on Meta::CPAN
}
# deprecated
$video{'pid'} = ASYNC(\&shellcmd_unlock, \@cmd, $video{'out_filepath'});
# our file isn't ready yet, so create a timer to check the progress and act
weaken($request); # the only one who should be keeping $request alive is the client
$request->{'client'}{'server'}{'evp'}->add_timer(0, 0, sub {
if(! defined $request) {
say "\$request undef, ignoring CB";
return undef;
}
# test if its ready to send
lib/App/MHFS.pm view on Meta::CPAN
last;
}
if(defined $video{'on_exists'}) {
last if (! $video{'on_exists'}->($settings, \%video));
}
say "get_video_timer is destructing";
$request->SendLocalFile($filename);
return undef;
}
# 404, if we didn't send yet the process is not running
if(pid_running($video{'pid'})) {
return 1;
}
say "pid not running: " . $video{'pid'} . " get_video_timer done with 404";
$request->Send404;
return undef;
});
say "get_video: added timer " . $video{'out_filepath'};
});
}
else {
say "out_fmt: " . $video{'out_fmt'};
$request->Send404;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MaMGal/Formatter.pm view on Meta::CPAN
my $suppress_description = shift;
my $path = $entry->page_path;
my $thumbnail_path = $entry->thumbnail_path;
my $ret = '';
$ret .= '<td class="entry_cell">';
my @timeret;
foreach my $time ($entry->creation_time()) {
push @timeret, sprintf('<span class="date">%s</span> <span class="time">%s</span>', $self->{locale_env}->format_date($time), $self->{locale_env}->format_time($time));
}
$ret .= '<br>'.join(' — ', @timeret).'<br>';
$ret .= $self->LINK($path, $self->MAYBE_IMG($thumbnail_path));
if ($entry->description and not $suppress_description) {
$ret .= sprintf('<br><span class="desc">%s</span>', $entry->description);
} else {
$ret .= sprintf('<br><span class="filename">[%s]</span><br>', $self->LINK($path, $entry->name));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ManiacDownloader.pm view on Meta::CPAN
my $NUM_CONN_BYTES_THRESHOLD = 4_096 * 2;
has '_finished_condvar' => ( is => 'rw' );
has '_ranges' => ( isa => 'ArrayRef', is => 'rw' );
has '_remaining_connections' => ( isa => 'Int', is => 'rw' );
has '_stats_timer' => ( is => 'rw' );
has '_last_timer_time' => ( is => 'rw', isa => 'Num' );
has '_len' => ( is => 'rw', isa => 'Int' );
has '_downloaded' => (
is => 'rw',
isa => 'App::ManiacDownloader::_BytesDownloaded',
default => sub { return App::ManiacDownloader::_BytesDownloaded->new; }
lib/App/ManiacDownloader.pm view on Meta::CPAN
return;
}
my $MAX_CHECKS = 6;
sub _handle_stats_timer
{
my ($self) = @_;
my ( $num_dloaded, $total_downloaded ) =
$self->_downloaded->_flush_and_report;
lib/App/ManiacDownloader.pm view on Meta::CPAN
$self->_start_connection($idx);
}
}
my $time = AnyEvent->now;
my $last_time = $self->_last_timer_time;
printf "Downloaded %i%% (Currently: %.2fKB/s)\r",
int( $total_downloaded * 100 / $self->_len ),
( $num_dloaded / ( 1024 * ( $time - $last_time ) ) ),
;
STDOUT->flush;
$self->_last_timer_time($time);
return;
}
sub _slurp
lib/App/ManiacDownloader.pm view on Meta::CPAN
$self->_start_connection($idx);
}
}
my $timer = AnyEvent->timer(
after => 3,
interval => 3,
cb => sub {
$self->_handle_stats_timer;
return;
},
);
$self->_last_timer_time( AnyEvent->time() );
$self->_stats_timer($timer);
{
no autodie;
unlink( $self->_file->_resume_info_path() );
}
lib/App/ManiacDownloader.pm view on Meta::CPAN
my $signal_handler = sub { $self->_abort_signal_handler(); };
local $SIG{INT} = $signal_handler;
local $SIG{TERM} = $signal_handler;
$self->_finished_condvar->recv;
$self->_stats_timer( undef() );
if ( !$self->_remaining_connections() )
{
rename( $self->_file->_downloading_path(),
$self->_file->_url_basename() );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MatrixClient/RoomTab.pm view on Meta::CPAN
$self->set_typing_line( $s );
},
);
$room->add_child( $self->{typing_grace_timer} = IO::Async::Timer::Countdown->new(
delay => TYPING_GRACE_SECONDS,
on_expire => sub { $room->typing_stop },
) );
}
lib/App/MatrixClient/RoomTab.pm view on Meta::CPAN
sub still_typing
{
my $self = shift;
my $timer = $self->{typing_grace_timer};
if( $timer->is_running ) {
$timer->reset;
}
else {
$self->{room}->typing_start;
$timer->start;
}
}
sub update_headline
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Midgen.pm view on Meta::CPAN
$self->find_runtime_modules();
$self->find_test_modules();
$self->find_develop_modules() if $self->experimental;
#now for some Heuristics :)
$self->recast_to_runtimerequires($self->{RuntimeRequires},
$self->{RuntimeRecommends});
$self->recast_to_testrequires($self->{TestRequires}, $self->{TestSuggests});
# Now we have switched to MetaCPAN-Api we can hunt for noisy children in tests
if ($self->experimental) {
view all matches for this distribution
view release on metacpan or search on metacpan
root/js/ext-3.3.1/ext-all.js view on Meta::CPAN
* Ext JS Library 3.3.1
* Copyright(c) 2006-2010 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
*/
(function(){var h=Ext.util,k=Ext.each,g=true,i=false;h.Observable=function(){var l=this,m=l.events;if(l.listeners){l.on(l.listeners);delete l.listeners}l.events=m||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:fu...
/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var F="undefined",t="object",U="Shockwave Flash",Y="ShockwaveFlash.ShockwaveFlash",s="application/x-shockwave-flash",T="SWFObjectExprInst",z="onreadystatechange",Q=window,l=document,v=navigator,V=false,W=[i],q=[],P=[],K=[],n,...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MojoSlides/files/public/jquery.min.js view on Meta::CPAN
/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.3.min.map
*/
(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],p="2.0.3",f=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,x=function(e,n){return new x.fn.in...
};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return q.get(e,n)||q.access(e,n,{empty:x.Callbacks("once memory").add(funct...
},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Xt,Ut,Yt=x.now(),Vt=/\?/,Gt=/#.*$/,Jt=/([?&])_=[^&]*/,Qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Kt=/^(?:a...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MonM/Daemon.pm view on Meta::CPAN
: App::MonM::QNotifier->new(%nargs);
# Create Checkit object
$self->{checker} = App::MonM::Checkit->new;
# Create process timers
my $ctrl = AnyEvent->timer (after => START_DELAY, interval => INTERVAL_CTRL, cb => sub {
$quit_program->send(1) unless $self->ok;
});
my $interval = int(uv2zero(lvalue($ctk->config("interval"))) || INTERVAL_MAIN); # Time interval. 1 op per n sec
my $after = (($self->{workerident} - 1) * int($interval / ($self->{forkers} - 1))) || START_DELAY;
my $timer = AnyEvent->timer (after => $after, interval => $interval, cb => sub {
$quit_program->send(1) unless $self->ok;
$self->slave($alloc); # Go!
});
my $rmnd = AnyEvent->timer (after => INTERVAL_REMIND+START_DELAY, interval => INTERVAL_REMIND, cb => sub {
$quit_program->send(1) unless $self->ok;
$self->remind() if $self->{workerident} == 1;
});
# Run!
view all matches for this distribution
view release on metacpan or search on metacpan
ok($message->{hearbeat_last_change_ts_span}, 'correctly received non-zero "hearbeat_last_change_ts_span"');
ok(($message->{hearbeat_last_change_ts_span} and ($message->{hearbeat_last_change_ts_span} > 1)), '"hearbeat_last_change_ts_span" is correctly greater than 1');
ok(($message->{hearbeat_last_change_ts_span} and ($message->{hearbeat_last_change_ts_span} < 10)), '"hearbeat_last_change_ts_span" is correctly less than 10');
}
#send the same thing, which should not reset the timer
IPC::Transit::send(qname => 'Heartbeat', message => {
inform_instance => 'servers.whatever.check_runner',
status => 'OK',
stdout => 'returned OK',
is_std_heartbeat_check => 1,
});
{ #these messages should not have a reset timer
my $message;
eval {
local $SIG{ALRM} = sub { die "timed out\n"; };
alarm 5;
while($message = IPC::Transit::receive(qname => 'test_out')) {
is($message->{foo}, 'bar', 'foo is correctly set to "bar"');
ok($message->{hearbeat_last_change_ts_span}, 'correctly received non-zero "hearbeat_last_change_ts_span"');
ok(($message->{hearbeat_last_change_ts_span} and ($message->{hearbeat_last_change_ts_span} > 6)), '"hearbeat_last_change_ts_span" is correctly greater than 6');
ok(($message->{hearbeat_last_change_ts_span} and ($message->{hearbeat_last_change_ts_span} < 20)), '"hearbeat_last_change_ts_span" is correctly less than 20');
}
#send the different thing, which should reset the timer
IPC::Transit::send(qname => 'Heartbeat', message => {
inform_instance => 'servers.whatever.check_runner',
status => 'CRIT',
stdout => 'returned CRIT',
is_std_heartbeat_check => 1,
});
{ #these messages should have a reset timer
my $message;
eval {
local $SIG{ALRM} = sub { die "timed out\n"; };
alarm 5;
while($message = IPC::Transit::receive(qname => 'test_out')) {
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/ace.js view on Meta::CPAN
(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMES...
window.require(["ace/ace"], function(a) {
if (a) {
a.config.init(true);
a.define = window.define;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
my $delay = $self->interval * scalar keys %{ $self->{_tasks} || {} };
# There's probably a better way to throttle the sends
# but this will work for now since we currently don't support retries
my $w; $w = AE::timer $delay, 0, sub {
undef $w;
$self->_send_request($request);
};
return $self;
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
else {
$results = { 'status' => $status };
}
# Clear request specific data
delete $request->{timer};
# Cleanup
delete $self->{_tasks}{ $request->{destination} };
# Done
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
$msg .= _encode_name( "*", "\x00", 0 );
$msg .= pack( "n*", 0x21, 0x0001 );
$request->{start} = time;
$request->{timer} = AE::timer $self->timeout, 0, sub {
$self->_store_result( $request, 'TIMEOUT' );
};
my $fh = $self->{fh4};
view all matches for this distribution
view release on metacpan or search on metacpan
share/mib/BGP4-MIB.txt view on Meta::CPAN
SYNTAX Gauge32
UNITS "seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"This timer indicates how long (in
seconds) this peer has been in the
established state or how long
since this peer was last in the
established state. It is set to zero when
a new peer is configured or when the router is
share/mib/BGP4-MIB.txt view on Meta::CPAN
UNITS "seconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Time interval (in seconds) for the
ConnectRetry timer. The suggested value
for this timer is 120 seconds."
REFERENCE
"RFC 4271, Section 8.2.2. This is the value used
to initialize the 'ConnectRetryTimer'."
::= { bgpPeerEntry 17 }
share/mib/BGP4-MIB.txt view on Meta::CPAN
UNITS "seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Time interval (in seconds) for the KeepAlive
timer established with the peer. The value
of this object is calculated by this BGP
speaker such that, when compared with
bgpPeerHoldTime, it has the same proportion
that bgpPeerKeepAliveConfigured has,
compared with bgpPeerHoldTimeConfigured.
If the KeepAlive timer has not been established
with the peer, this object MUST have a value
of zero (0).
If the of bgpPeerKeepAliveConfigured object
has a value of (0), then this object MUST have
share/mib/BGP4-MIB.txt view on Meta::CPAN
Time (bgpPeerHoldTime) with the peer.
This value must not be less than three
seconds if it is not zero (0). If it is
zero (0), the Hold Time is NOT to be
established with the peer. The suggested
value for this timer is 90 seconds."
REFERENCE
"RFC 4271, Section 4.2.
RFC 4271, Section 10."
::= { bgpPeerEntry 20 }
share/mib/BGP4-MIB.txt view on Meta::CPAN
UNITS "seconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Time interval (in seconds) for the
KeepAlive timer configured for this BGP
speaker with this peer. The value of this
object will only determine the
KEEPALIVE messages' frequency relative to
the value specified in
bgpPeerHoldTimeConfigured; the actual
time interval for the KEEPALIVE messages is
indicated by bgpPeerKeepAlive. A
reasonable maximum value for this timer
would be one third of that of
bgpPeerHoldTimeConfigured.
If the value of this object is zero (0),
no periodical KEEPALIVE messages are sent
to the peer after the BGP connection has
been established. The suggested value for
this timer is 30 seconds."
REFERENCE
"RFC 4271, Section 4.4.
RFC 4271, Section 10."
::= { bgpPeerEntry 21 }
share/mib/BGP4-MIB.txt view on Meta::CPAN
UNITS "seconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Time interval (in seconds) for the
MinASOriginationInterval timer.
The suggested value for this timer is 15
seconds."
REFERENCE
"RFC 4271, Section 9.2.1.2.
RFC 4271, Section 10."
::= { bgpPeerEntry 22 }
share/mib/BGP4-MIB.txt view on Meta::CPAN
UNITS "seconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Time interval (in seconds) for the
MinRouteAdvertisementInterval timer.
The suggested value for this timer is 30
seconds for EBGP connections and 5
seconds for IBGP connections."
REFERENCE
"RFC 4271, Section 9.2.1.1.
RFC 4271, Section 10."
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PDRUtils/DistIniCmd/add_prereq.pm view on Meta::CPAN
my $section;
for my $s ($iod->list_sections) {
next unless $s =~ m!\Aprereqs(?:\s*/\s*(\w+))?\z!ix;
if ($phase eq 'runtime' && $rel eq 'requires') {
next unless !$1 || lc($1) eq 'runtimerequires';
} else {
next unless $1 && lc($1) eq $phase.$rel;
}
$section = $s;
last;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/PLab/ImageApp.pm view on Meta::CPAN
$self-> set(
text => $text,
raise => 1,
);
$self-> update_view;
$self-> { timer} = $self-> insert( Timer =>
onTick => sub {
$_[0]-> stop;
$_[0]-> owner-> set(
text => '',
raise => 0,
);
},
) unless $self-> { timer};
$self-> { timer}-> stop;
$self-> { timer}-> timeout( $w-> {ini}-> {statusDelay} * 1000);
$self-> { timer}-> start;
}
# SB_END
sub profile_default
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Phoebe.pm view on Meta::CPAN
$log->error("Unable to unlock $lock");
result($stream, "40", "The wiki is locked; try again in a few seconds");
$stream->close_gracefully();
} else {
$log->debug("Waiting $count...");
Mojo::IOLoop->timer(0.2 => sub {
with_lock($stream, $host, $space, $code, $count + 1)});
# don't close the stream
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Physics/ParticleMotion.pm view on Meta::CPAN
# Previous values for line drawing
my @prev_x = ();
my @prev_y = ();
# Start time of the simulation for speed adjustment on fast systems
my $timeref = time();
# main loop
while (1) {
# Delete old lines if we don't want to keep traces.
lib/App/Physics/ParticleMotion.pm view on Meta::CPAN
$prev_y[$p_no] = $y;
}
# Speed control.
DoOneEvent(DONT_WAIT);
my $endtime = $timeref + $t / $time_warp;
while ( $endtime > time() ) {
sleep(0.01);
DoOneEvent(DONT_WAIT);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/cpan/Mojo2/UserAgent.pm view on Meta::CPAN
return undef unless my $id = $self->_connection( $loop, $tx, $cb );
if ( my $t = $self->request_timeout ) {
weaken $self;
$self->{connections}{$id}{timeout} ||=
$loop->timer( $t => sub { $self->_error( $id, 'Request timeout' ) } );
}
return $id;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Prolix.pm view on Meta::CPAN
quit
snippet
stats
)];
my $t = IPC::Run::timer(0.3);
my $ipc = IPC::Run::start $self->_cmd,
\undef, # no stdin
$self->_out,
$self->_err,
$t;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Prove/Plugin/CumulativeTimer.pm view on Meta::CPAN
use TAP::Formatter::Session;
sub load {
my ( $class, $p ) = @_;
$p->{app_prove}->timer(1);
my $first_start_time;
my $first_start_times;
around 'TAP::Formatter::Session::time_report' => sub {
my $orig = shift;
lib/App/Prove/Plugin/CumulativeTimer.pm view on Meta::CPAN
# [14:22:52] tests/test1.t .. ok 2052 ms ( 0.00 usr 0.00 sys + 0.04 cusr 0.01 csys = 0.05 CPU)
# [14:22:54] tests/test2.t .. ok 2111 ms ( 0.01 usr 0.00 sys + 0.08 cusr 0.02 csys = 0.11 CPU)
# When you don't use this plugin, elapsed time of tests/tes2.t is not cumulative.
$ prove --timer tests
# [14:22:31] tests/test1.t .. ok 2049 ms ( 0.00 usr 0.00 sys + 0.04 cusr 0.01 csys = 0.05 CPU)
# [14:22:33] tests/test2.t .. ok 60 ms ( 0.01 usr 0.00 sys + 0.05 cusr 0.01 csys = 0.07 CPU)
=head1 DESCRIPTION
App::Prove::Plugin::CumulativeTimer is a prove plugin to display cumulative elapsed time of tests.
This plugin replaces elaped time of --timer option with cumulative elapsed time.
--timer option is always set when you load this plugin.
=head1 LICENSE
Copyright (C) Masahiro Iuchi.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RPi/EnvUI.pm view on Meta::CPAN
A self-contained, one-page web application that runs on a Raspberry Pi and
monitors and manages an indoor grow room environment, with an API that can be
used external to the web app itself.
This distribution reads environmental sensors, turns on/off devices based on
specific thresholds, contains an adjustable grow light timer, and five extra
auxillary channels that you can configure for your own use.
The software connects to Raspberry Pi GPIO pins for each C<"auxillary">, and at
specific times or thresholds, turns on and or off the 120/240v devices that
you've relayed to that voltage (if you choose to use this functionality).
lib/App/RPi/EnvUI.pm view on Meta::CPAN
Reads temperature and humidity data via a hygrometer sensor through the
L<RPi::DHT11> distribution.
It then allows, through a one-page asynchronous web UI to turn on and off
120/240v devices through buttons, timers and reached threshold limits.
For example. We have a max temperature limit of 80F. We assign an auxillary
(GPIO pin) that is connected to a relay to a 120v exhaust fan. Through the
configuration file, we load the temp limit, and if the temp goes above it, we
enable the fan via the GPIO pin.
view all matches for this distribution