view release on metacpan or search on metacpan
for my $i (1 .. $how_many) {
Async::ContextSwitcher->new( test => $i );
my $w;
$w = AnyEvent->timer( after => rand()*0.1, cb => cb_w_context {
$w = undef;
my $cb = cb_w_context {
is context->{test}, $i, "good $i";
$cv->send if --$how_many == 0;
view all matches for this distribution
view release on metacpan or search on metacpan
$d = Async::Defer->new();
$d->do(sub{
my ($d, $n) = @_;
$n++;
$d->{t} = AE::timer 0.01, 0, sub{ $d->done($n) };
});
$d->do(sub{
my ($d, $n) = @_;
$n+=10;
$result = $n;
$d->done($n);
});
$t = AE::timer 0.01, 0, sub{ $d->run(undef, 3) };
$tx= AE::timer 0.5, 0, sub{ $cv->send };
$result = undef;
$cv = AE::cv; $cv->recv;
is $result, 14, 'handle correctly both sync and async functions';
$p = Async::Defer->new();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Event/Interval.pm view on Meta::CPAN
To have the event get different values in the params each time the callback is
called, see L</start(@params)>.
=head2 start(@params)
Starts the event timer. Each time the interval is reached, the event callback
is executed.
Parameters:
@params
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Microservice/Time.pm view on Meta::CPAN
This is the only parallel processed reponse method (the other ones are
pure CPU-only bound) that sleep given (or random) number of seconds and
only then returns the request response with when it started and how long
it took. Normally this the same as what is in duration parameter, but in
case the server is overloaded with requests, the event loop may call the
timer handler much later than the duration. Try:
ab -n 1000 -c 500 http://localhost:8085/v1/sleep?duration=3
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 259 432.8 21 1033
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Template.pm view on Meta::CPAN
$cv->begin;
my $tt2 = Async::Template->new({
DONE => sub{ my $output = shift; $cv->end; },
}) || die Async::Template->error();
$cv->begin;
AnyEvent->timer(after => 10, cb => sub { $cv->end; });
$cv->recv
# usage in perl code for async processes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Trampoline.pm view on Meta::CPAN
While Asyncs are Future-like, you cannot resolve an Async explicitly.
Check out the L<Future|Future> module instead.
This module does not implement an event loop.
The C<run_until_completion()> function does run a dispatch loop,
but there is no concept of events, I/O, or timers.
Check out the L<IO::Async|IO::Async> module instead.
This module is not thread-aware.
Handling the same Async on multiple threads is undefined behaviour.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Util.pm view on Meta::CPAN
Examples using AnyEvent:
use AnyEvent;
use Async::Util qw(amap);
my @timers;
my $delayed_double = sub {
my ($input, $cb) = @_;
push @timers, AnyEvent->timer(after => 2, cb => sub {
$cb->($input*2);
});
};
my $cv = AE::cv;
lib/Async/Util.pm view on Meta::CPAN
achain(
input => 2,
steps => [
sub {
my ($input, $cb) = @_;
push @timers, AnyEvent->timer(
after => 0,
cb => sub { $cb->($input+1) },
);
},
sub {
my ($input, $cb) = @_;
push @timers, AnyEvent->timer(
after => 0,
cb => sub { $cb->($input * 2) },
);
},
],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/Beep/Linux/PP.pm view on Meta::CPAN
sound requests to be phrased. If you see Raine, thank him for me.
June 28, email from Peter Tirsek (peter at tirsek dot com):
This number represents the fixed frequency of the original PC XT's
timer chip (the 8254 AFAIR), which is approximately 1.193 MHz. This
number is divided with the desired frequency to obtain a counter value,
that is subsequently fed into the timer chip, tied to the PC speaker.
The chip decreases this counter at every tick (1.193 MHz) and when it
reaches zero, it toggles the state of the speaker (on/off, or in/out),
resets the counter to the original value, and starts over. The end
result of this is a tone at approximately the desired frequency. :)
view all matches for this distribution
view release on metacpan or search on metacpan
libsamplerate/examples/audio_out.c view on Meta::CPAN
else if (snd_pcm_status_get_state (status) == SND_PCM_STATE_XRUN)
{ struct timeval now, diff, tstamp ;
gettimeofday (&now, 0) ;
snd_pcm_status_get_trigger_tstamp (status, &tstamp) ;
timersub (&now, &tstamp, &diff) ;
fprintf (stderr, "alsa_write_float xrun: of at least %.3f msecs. resetting stream\n",
diff.tv_sec * 1000 + diff.tv_usec / 1000.0) ;
}
else
view all matches for this distribution
view release on metacpan or search on metacpan
if (MAD_RECOVERABLE(stream->error))
err = 0;
if (!err) {
THIS->current_frame++;
THIS->accum_bitrate += header->bitrate / 1000;
mad_timer_add(&THIS->total_duration, header->duration);
}
XSRETURN_YES;
#
# Create PCM stream (in mad_fixed_t type) from decoded frame
double
frame_duration(THIS)
Audio_MPEG_Decode THIS
CODE:
RETVAL = (double)mad_timer_count(THIS->frame->header.duration,
MAD_UNITS_MILLISECONDS) / 1000.0;
OUTPUT:
RETVAL
double
total_duration(THIS)
Audio_MPEG_Decode THIS
CODE:
RETVAL = (double)mad_timer_count(THIS->total_duration,
MAD_UNITS_MILLISECONDS) / 1000.0;
OUTPUT:
RETVAL
unsigned int
view all matches for this distribution
view release on metacpan or search on metacpan
)],
f => [qw(MAD_F_ONE MAD_F_MIN MAD_F_MAX MAD_F_FRACBITS)],
layer => [qw(MAD_LAYER_I MAD_LAYER_II MAD_LAYER_III)],
mode => [qw(MAD_MODE_SINGLE_CHANNEL MAD_MODE_DUAL_CHANNEL MAD_MODE_JOINT_STEREO MAD_MODE_STEREO)],
option => [qw(MAD_OPTION_HALFSAMPLERATE MAD_OPTION_IGNORECRC)],
timer => [qw(MAD_TIMER_RESOLUTION)],
units => [qw(
MAD_UNITS_11025_HZ MAD_UNITS_12000_HZ MAD_UNITS_16000_HZ
MAD_UNITS_22050_HZ MAD_UNITS_24000_HZ MAD_UNITS_32000_HZ
MAD_UNITS_44100_HZ MAD_UNITS_48000_HZ MAD_UNITS_8000_HZ
MAD_UNITS_CENTISECONDS MAD_UNITS_DECISECONDS MAD_UNITS_HOURS
use Audio::Mad qw(:all);
my $stream = new Audio::Mad::Stream();
my $frame = new Audio::Mad::Frame();
my $synth = new Audio::Mad::Synth();
my $timer = new Audio::Mad::Timer();
my $resample = new Audio::Mad::Resample(44100, 22050);
my $dither = new Audio::Mad::Dither();
my $buffer = join('', <STDIN>);
$stream->buffer($buffer);
=item * :mode
MAD_MODE_SINGLE_CHANNEL MAD_MODE_STEREO
MAD_MODE_DUAL_CHANNEL MAD_MODE_JOINT_STEREO
=item * :timer
MAD_TIMER_RESOLUTION
=item * :units
view all matches for this distribution
view release on metacpan or search on metacpan
demo/player-gtk-ipc view on Meta::CPAN
$song_paused->store(0);
my ($song_loaded,$song_playing) = (0,0);
my ($songfile,$songpath,$player_busy);
my ($filelabel,$songlabel,$child,$progress_timer);
my $url = 'http://electricrain.com/';
my $subs = {
'exit' => \&_exit,
'back' => \&_back,
demo/player-gtk-ipc view on Meta::CPAN
my $pbar = Gtk::ProgressBar->new;
$pbar->set_usize(200,20);
$vbox->pack_start($pbar,1,1,0);
$pbar->show;
#$progress_timer = Gtk->timeout_add(100, \&progress_timeout, $pbar);
####################################
# label for currently open file path
$filelabel = Gtk::Label->new('');
$vbox->pack_start($filelabel, FALSE, FALSE, 0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/Nama.pm view on Meta::CPAN
what: Stop recording after the last audio file finishes playing. Can be turned off with limit-run-time_off.
short: lr
parameters: [ <float:additional_seconds> ]
limit_run_time_off:
type: setup
what: Disable the recording stop timer.
short: lro
parameters: none
offset_run:
type: setup
what: Record/play from a mark, rather than from the start, i.e. 0.0 seconds.
lib/Audio/Nama.pm view on Meta::CPAN
? eval "$Audio::Nama::setup->{audio_length} $sign $item{dd}"
: $item{dd};
Audio::Nama::pager( "Run time limit: ", Audio::Nama::heuristic_time($Audio::Nama::setup->{runtime_limit})); 1;
}
limit_run_time_off: _limit_run_time_off {
Audio::Nama::pager( "Run timer disabled");
Audio::Nama::disable_length_timer();
1;
}
offset_run: _offset_run markname {
Audio::Nama::set_offset_run_mark( $item{markname} ); 1
}
lib/Audio/Nama.pm view on Meta::CPAN
If midish is configured to use ALSA (default on Linux systems) then ``filename'' should contain the ALSA sequencer port, as listed by ``aseqdump -l'', (eg. ``28:0'', ``FLUID Synth (qsynth)''). If ``nil'' is given instead of the path, then the por...
ddel devnum
detach device number ``devnum''
dmtcrx devnum
use device number ``devnum'' as MTC source. In this case, midish will relocate, start and stop according to incoming MTC messages. Midish will generate its clock ticks from MTC, meaning that it will run at the same speed as the MTC device. This i...
dmmctx { devnum1 devnum2 ... }
Configure the given devices to transmit MMC start, stop and relocate messages. Useful to control MMC-capable audio applications from midish. By default, devices transmit MMC.
dclktx { devnum1 devnum2 ... }
Configure the given devices to transmit MIDI clock information (MIDI ticks, MIDI start and MIDI stop events). Useful to synchronize an external sequencer to midish.
dclkrx devnum
lib/Audio/Nama.pm view on Meta::CPAN
``mididev'' - show raw MIDI traffic on stderr
``mixout'' - show conflicts in the output MIDI merger
``norm'' - show events in the input normalizer
``pool'' - show pool usage on exit
``song'' - show start/stop events
``timo'' - show timer internal errors
``mem'' - show memory usage
version
Display midish version.
panic
view all matches for this distribution
view release on metacpan or search on metacpan
mpg123/system.c view on Meta::CPAN
}
return ret;
}
static unsigned long system_raw_timer_value(unsigned char *buf)
{
unsigned long val;
if(!(buf[0] & 0x1) || !(buf[2] & 0x1) || !(buf[4] & 0x1)) {
if(verbose)
mpg123/system.c view on Meta::CPAN
}
switch( buf[pos] & 0xf0) {
case 0x00:
if(buf[pos] != 0x0f) {
fprintf(stderr,"Ouch ... illegal timer code!\n");
return -1;
}
pos++;
break;
case 0x20:
pi->pts = system_raw_timer_value(buf+pos);
pos += 5;
break;
case 0x30:
pi->pts = system_raw_timer_value(buf+pos);
pos += 5;
if( (buf[pos] & 0xf) != 0x10) {
if(verbose)
fprintf(stderr,"DTS should start with 0x1x!\n");
}
pi->dts = system_raw_timer_value(buf+pos);
pos += 5;
break;
default:
if(verbose)
fprintf(stderr,"Ouch ... illegal timer code!\n");
return -1;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/Radio/Sirius.pm view on Meta::CPAN
PIDs, signal strength, and other information. Calling monitor initiates reads of this data.
Reads happen automatically when commands are executed (for example changing the channel or muting the tuner). Still, monitor generally needs
to be called as often as possible to gather the latest data from the Tuner.
A monitor cycle will take a minimum of one second. If data is received, this timer resets. In other words, monitor may take longer than you anticipate.
The amount of time monitor takes will depend on the C<verbosity> of the tuner.
If no number of cycles is specified, monitor runs one cycle.
B<Note:> As of version 0.02, the cycle parameter is no longer a true count of the number of cycles. The number specified is multiplied by 20.
view all matches for this distribution
view release on metacpan or search on metacpan
=item B<$OBJECT>->B<getSpeed>([SCALAR])
Returns the speed of the song number specified by SCALAR. If no SCALAR is
specified, returns the speed of song #1. Speed can be either 0 (indicating a
vertical blank interrupt (50Hz PAL, 60Hz NTSC)), or 1 (indicating CIA 1 timer
interrupt (default is 60Hz)).
For PlaySID specific files the corresponding bit of I<speed> from SCALAR modulo
32 is returned ("wraparound" behavior for songs > 32).
=item B<$OBJECT>->B<setSpeed>(SCALAR1, SCALAR2)
Changes the speed of the song number specified by SCALAR1 to that of SCALAR2.
SCALAR1 has to be more than 1 and less than the value of the I<songs> field.
SCALAR2 can be either 0 (indicating a vertical blank interrupt (50Hz PAL, 60Hz
NTSC)), or 1 (indicating CIA 1 timer interrupt (default is 60Hz)). An undef is
returned if neither was specified.
For PlaySID specific files if SCALAR1 is greater than 32, the SCALAR1 module 32
bit of the I<speed> field will be set, overwriting whatever value was in that
bit before ("wraparound" behavior for songs > 32).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/StreamGenerator.pm view on Meta::CPAN
my $streamer_sub = $streamer->get_streamer(0.25);
$loop->recurring(0.1 => $streamer_sub);
$loop->start;
Note: event loop will be blocked for up to 0.25 seconds every time the timer is done.
=head2 skip
$streamer->skip();
view all matches for this distribution
view release on metacpan or search on metacpan
Data/Data.pm view on Meta::CPAN
=item $copy = $audio->clone
Creates copy of data carrying over sample rate and complex-ness of data.
=item $slice = $audio->timerange($start_time,$end_time);
Returns a time-slice between specified times.
=item $audio->Load($fh)
view all matches for this distribution
view release on metacpan or search on metacpan
examples/js/jquery-1.9.1.js view on Meta::CPAN
}
};
}
});
}
var fxNow, timerId,
rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
rrun = /queueHooks$/,
animationPrefilters = [ defaultPrefilter ],
tweeners = {
examples/js/jquery-1.9.1.js view on Meta::CPAN
if ( jQuery.isFunction( animation.opts.start ) ) {
animation.opts.start.call( elem, animation );
}
jQuery.fx.timer(
jQuery.extend( tick, {
elem: elem,
anim: animation,
queue: animation.opts.queue
})
examples/js/jquery-1.9.1.js view on Meta::CPAN
}
return this.each(function() {
var dequeue = true,
index = type != null && type + "queueHooks",
timers = jQuery.timers,
data = jQuery._data( this );
if ( index ) {
if ( data[ index ] && data[ index ].stop ) {
stopQueue( data[ index ] );
examples/js/jquery-1.9.1.js view on Meta::CPAN
stopQueue( data[ index ] );
}
}
}
for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
timers[ index ].anim.stop( gotoEnd );
dequeue = false;
timers.splice( index, 1 );
}
}
// start the next in the queue if the last step wasn't forced
// timers currently will call their complete callbacks, which will dequeue
// but only if they were gotoEnd
if ( dequeue || !gotoEnd ) {
jQuery.dequeue( this, type );
}
});
examples/js/jquery-1.9.1.js view on Meta::CPAN
return this.each(function() {
var index,
data = jQuery._data( this ),
queue = data[ type + "queue" ],
hooks = data[ type + "queueHooks" ],
timers = jQuery.timers,
length = queue ? queue.length : 0;
// enable finishing flag on private data
data.finish = true;
examples/js/jquery-1.9.1.js view on Meta::CPAN
if ( hooks && hooks.cur && hooks.cur.finish ) {
hooks.cur.finish.call( this );
}
// look for any active animations, and finish them
for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
timers[ index ].anim.stop( true );
timers.splice( index, 1 );
}
}
// look for any animations in the old queue and finish them
for ( index = 0; index < length; index++ ) {
examples/js/jquery-1.9.1.js view on Meta::CPAN
swing: function( p ) {
return 0.5 - Math.cos( p*Math.PI ) / 2;
}
};
jQuery.timers = [];
jQuery.fx = Tween.prototype.init;
jQuery.fx.tick = function() {
var timer,
timers = jQuery.timers,
i = 0;
fxNow = jQuery.now();
for ( ; i < timers.length; i++ ) {
timer = timers[ i ];
// Checks the timer has not already been removed
if ( !timer() && timers[ i ] === timer ) {
timers.splice( i--, 1 );
}
}
if ( !timers.length ) {
jQuery.fx.stop();
}
fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {
if ( timer() && jQuery.timers.push( timer ) ) {
jQuery.fx.start();
}
};
jQuery.fx.interval = 13;
jQuery.fx.start = function() {
if ( !timerId ) {
timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
}
};
jQuery.fx.stop = function() {
clearInterval( timerId );
timerId = null;
};
jQuery.fx.speeds = {
slow: 600,
fast: 200,
examples/js/jquery-1.9.1.js view on Meta::CPAN
// Back Compat <1.8 extension point
jQuery.fx.step = {};
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.animated = function( elem ) {
return jQuery.grep(jQuery.timers, function( fn ) {
return elem === fn.elem;
}).length;
};
}
jQuery.fn.offset = function( options ) {
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/jquery.js view on Meta::CPAN
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n===...
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","padd...
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;f...
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments)...
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.repl...
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true...
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opaci...
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function...
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop]...
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop===...
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data...
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options....
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="...
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.do...
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElem...
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0...
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend...
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixed...
view all matches for this distribution
view release on metacpan or search on metacpan
t/60-json.t view on Meta::CPAN
subtest 'authentication' => sub {
isa_ok( $auth->provider($provider), 'Authen::Pluggable::' . $provider );
$auth->provider($provider)->_cfg->{url}->path('/auth')
->port( $t->ua->server->url->port );
my $loop = Mojo::IOLoop->singleton;
$loop->timer( 20 => sub { fail('Timeout'); $loop->stop } );
$loop->subprocess->run(
sub {
my $uinfo = $auth->authen( $user, '' );
is( $uinfo, undef, 'User no authenticated (missing pass)' );
$uinfo = $auth->authen( $user, $pass . $pass );
view all matches for this distribution
view release on metacpan or search on metacpan
raddb/dictionary.usr view on Meta::CPAN
VALUE USR-Connect-Term-Reason dspInterruptTimeout 64
VALUE USR-Connect-Term-Reason mnpProtocolViolation 65
VALUE USR-Connect-Term-Reason class2FaxHangupCmd 66
VALUE USR-Connect-Term-Reason hstSpeedSwitchTimeout 67
VALUE USR-Connect-Term-Reason tooManyUnacked 68
VALUE USR-Connect-Term-Reason timerExpired 69
VALUE USR-Connect-Term-Reason t1Glare 70
VALUE USR-Connect-Term-Reason priDialoutRqTimeout 71
VALUE USR-Connect-Term-Reason abortAnlgDstOvrIsdn 72
VALUE USR-Connect-Term-Reason normalUserCallClear 73
VALUE USR-Connect-Term-Reason normalUnspecified 74
raddb/dictionary.usr view on Meta::CPAN
VALUE USR-Failure-to-Connect-Reason dspInterruptTimeout 64
VALUE USR-Failure-to-Connect-Reason mnpProtocolViolation 65
VALUE USR-Failure-to-Connect-Reason class2FaxHangupCmd 66
VALUE USR-Failure-to-Connect-Reason hstSpeedSwitchTimeout 67
VALUE USR-Failure-to-Connect-Reason tooManyUnacked 68
VALUE USR-Failure-to-Connect-Reason timerExpired 69
VALUE USR-Failure-to-Connect-Reason t1Glare 70
VALUE USR-Failure-to-Connect-Reason priDialoutRqTimeout 71
VALUE USR-Failure-to-Connect-Reason abortAnlgDstOvrIsdn 72
VALUE USR-Failure-to-Connect-Reason normalUserCallClear 73
VALUE USR-Failure-to-Connect-Reason normalUnspecified 74
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AxKit/App/TABOO/XSP/User.pm view on Meta::CPAN
=cut
sub valid_authlevels : nodelist({http://www.kjetil.kjernsmo.net/software/TABOO/NS/User/Output}level) attribOrChild(username) {
return << 'EOC';
# my @levels = ("Guest", "New member", "Member", "Oldtimer", "Assistant", "Editor", "Administrator", "Director", "Guru", "God");
my $extremes = AxKit::App::TABOO::XSP::User::authlevel_extremes($attr_username);
(${$extremes}{'minlevel'} > ${$extremes}{'maxlevel'})
? ()
: (${$extremes}{'minlevel'} .. ${$extremes}{'maxlevel'});
EOC
view all matches for this distribution
view release on metacpan or search on metacpan
demo/webmail/js/prototype.js view on Meta::CPAN
this.onTimerEvent();
},
stop: function() {
this.updater.onComplete = undefined;
clearTimeout(this.timer);
(this.onComplete || Prototype.emptyFunction).apply(this, arguments);
},
updateComplete: function(request) {
if (this.options.decay) {
this.decay = (request.responseText == this.lastText ?
this.decay * this.options.decay : 1);
this.lastText = request.responseText;
}
this.timer = setTimeout(this.onTimerEvent.bind(this),
this.decay * this.frequency * 1000);
},
onTimerEvent: function() {
this.updater = new Ajax.Updater(this.container, this.url, this.options);
view all matches for this distribution
view release on metacpan or search on metacpan
ramblings/remark.js view on Meta::CPAN
require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t)...
this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE]};this.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)...
SUBST.contains=EXPRESSIONS;return{aliases:["coffee","cson","iced"],keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\...
}()},{}],8:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasse...
events.on("slideChanged",updateHash);navigateByHash()}function navigateByHash(){var slideNoOrName=(dom.getLocationHash()||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){dom.setLocationHash("#"+slideNoOrName)}}...
view all matches for this distribution
view release on metacpan or search on metacpan
t/100-timing-test.t view on Meta::CPAN
BEGIN {
use_ok('B::CompilerPhase::Hook');
}
BEGIN {
diag '... pausing to test timer';
}
use Timer;
diag '... timer took '.$Timer::TIME.' seconds';
ok($Timer::TIME > 1, '... the test value is greater than one');
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/BBS/Perm/Term.pm view on Meta::CPAN
$term->set_mouse_autohide( $conf->{mouse_autohide} );
}
my $timeout = defined $conf->{timeout} ? $conf->{timeout} : 60;
if ($timeout) {
$term->{timer} = Glib::Timeout->add( 1000 * $timeout,
sub { $term->feed_child( chr 0 ); return TRUE; }, $term );
}
}
sub clean { # called when child exited
view all matches for this distribution
view release on metacpan or search on metacpan
bin/bgpmon_analytics_db_0_pphTables.psql view on Meta::CPAN
CREATE TABLE pph.ppms (
dbid SERIAL NOT NULL,
peer_dbid INTEGER NOT NULL,
prefix_dbid INTEGER NOT NULL,
last_timerange_dbid INTEGER NULL,
prefix_safi INTEGER,
PRIMARY KEY (dbid),
UNIQUE(prefix_dbid,peer_dbid),
FOREIGN KEY(peer_dbid) REFERENCES pph.peers (dbid),
FOREIGN KEY(prefix_dbid) REFERENCES pph.prefixes (dbid)
);
CREATE TABLE pph.timeranges (
dbid SERIAL NOT NULL,
ppm_dbid INTEGER NOT NULL,
start_time TIMESTAMP WITHOUT TIME ZONE,
end_time TIMESTAMP WITHOUT TIME ZONE,
last_hop VARCHAR,
view all matches for this distribution
view release on metacpan or search on metacpan
bin/bgpmon_filter view on Meta::CPAN
log_info("Starting TCP listening thread.");
$tcpListThread = threads->create('tcpListener');
if($dbToRefresh){
log_info("Starting the timing thread for refreshing the database.");
$timeThread = threads->create('timer');
$timeThread->join();
log_info("Timing thread stopped sucessfully.");
}
bin/bgpmon_filter view on Meta::CPAN
print "Parser thread finished.\n" unless !$debug
}
sub timer{
while(!$exit){
log_info("Critical Prefixes will be refreshed in $dbrefresh minutes.");
Time::HiRes::sleep($dbrefresh*60); # will sleep for $dbrefresh minutes.
log_info("Refreshing Critical Prefixes.");
view all matches for this distribution
view release on metacpan or search on metacpan
etc/xfb_2_00.xsd view on Meta::CPAN
<xsd:complexType name="notification_type">
<xsd:choice>
<xsd:element name="MESSAGE_HEADER_ERROR" type="xfb:message_header_error_type" />
<xsd:element name="OPEN_MESSAGE_ERROR" type="xfb:open_message_error_type" />
<xsd:element name="UPDATE_MESSAGE_ERROR" type="xfb:update_message_error_type" />
<xsd:element name="HOLD_TIMER_EXPIRED" type="xfb:hold_timer_expired_type" />
<xsd:element name="FINITE_STATE_MACHINE_ERROR" type="xfb:finite_state_machine_error_type" />
<xsd:element name="CEASE" type="xfb:cease_type" />
<xsd:element name="UNKNOWN_ERROR" type="xfb:unknown_error_type" />
</xsd:choice>
<xsd:attribute name="bgp_message_type" type="xsd:integer"
etc/xfb_2_00.xsd view on Meta::CPAN
<xsd:element ref="xfb:SUBCODE" />
</xsd:sequence>
<xsd:attribute name="code" fixed="3" type="xsd:integer" />
</xsd:complexType>
<xsd:complexType name="hold_timer_expired_type">
<xsd:sequence>
<xsd:element ref="xfb:SUBCODE" />
</xsd:sequence>
<xsd:attribute name="code" fixed="4" type="xsd:integer" />
</xsd:complexType>
view all matches for this distribution