Result:
found more than 725 distributions - search limited to the first 2001 files matching your query ( run in 0.942 )


CDS

 view release on metacpan or  search on metacpan

lib/CDS/C.pm  view on Meta::CPAN

	SV * obj = newSVpvn((char *) &ts, sizeof(struct timespec));
	SvREADONLY_on(obj);
	return obj;
}

static struct timespec * timerFromSV(SV * sv) {
	if (! SvPOK(sv)) return NULL;
	STRLEN length;
	struct timespec * ts = (struct timespec *) SvPV(sv, length);
	return length == sizeof(struct timespec) ? ts : NULL;
}

SV * performanceElapsed(SV * svThis) {
	struct timespec * this = timerFromSV(svThis);
	if (this == NULL) return &PL_sv_undef;

	struct timespec ts;
	clock_gettime(CLOCK_MONOTONIC, &ts);
	time_t dsec = ts.tv_sec - this->tv_sec;

 view all matches for this distribution


CGI-Application-Plugin-DevPopup

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/DevPopup/Timing.pm  view on Meta::CPAN

my $start = [gettimeofday];

sub import
{
    my $c = scalar caller;
    $c->add_callback( 'devpopup_report', \&_timer_report );
    $c->new_hook('devpopup_addtiming');
    $c->add_callback( 'devpopup_addtiming', \&_add_time );
    foreach my $stage (qw/ init prerun load_tmpl /)
    {
        $c->add_callback( $stage, sub { _add_time( shift(), $stage, @_ ) } );
    }
    goto &Exporter::import;
}

sub _timer_report
{
    my $app = shift;

    my $self = _new_or_self($app);
    unshift @$self, { dec => 'start', tod => $start };

 view all matches for this distribution


CGI-Application-Search

 view release on metacpan or  search on metacpan

templates/prototype_javascript.tmpl  view on Meta::CPAN

    this.onTimerEvent();
  },

  stop: function() {
    this.updater.onComplete = undefined;
    clearTimeout(this.timer);
    (this.onComplete || Ajax.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


CGI-Inspect

 view release on metacpan or  search on metacpan

lib/CGI/Inspect/htdocs/js/jquery.js  view on Meta::CPAN

 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==...

 view all matches for this distribution


CGI-OptimalQuery

 view release on metacpan or  search on metacpan

lib/CGI/OptimalQuery/Resources/jquery.js  view on Meta::CPAN

/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d=...

 view all matches for this distribution


CGI-WML

 view release on metacpan or  search on metacpan

WML.pm  view on Meta::CPAN

        'select'    => '55',     # 0x37
        'small'     => '56',     # 0x38
        'strong'    => '57',     # 0x39
        'UNUSED'    => '58',     # 0x3A
        'template'  => '59',     # 0x3B
        'timer'     => '60',     # 0x3C
        'u'         => '61',     # 0x3D
        'setvar'    => '62',     # 0x3E
        'wml'       => '63',     # 0x3F
             );

WML.pm  view on Meta::CPAN

        'newcontext="false"' => '34',        # 0x22
        'newcontext="true"'  => '35',        # 0x23
        'onpick'            => '36',         # 0x24
        'onenterbackward'   => '37',         # 0x25
        'onenterforward'    => '38',         # 0x26
        'ontimer'           => '39',         # 0x27
        'optional="false"'  => '40',         # 0x28
        'optional="true"'   => '41',         # 0x29
        'path'              => '42',         # 0x2A
        'NULL,'             => '43',         # 0x2B
        'NULL,'             => '44',         # 0x2C

WML.pm  view on Meta::CPAN

        'type="help"'       => '58',         # 0x3A
        'type="password"'   => '59',         # 0x3B
        'type="onpick"'     => '60',         # 0x3C
        'type="onenterbackward"' => '61',    # 0x3D
        'type="onenterforward"'  => '62',    # 0x3E
        'type="ontimer"'    => '63',         # 0x3F
        'NULL,'             => '64',         # 0x40
        'NULL,'             => '65',         # 0x41
        'NULL,'             => '66',         # 0x42
        'NULL,'             => '67',         # 0x43
        'NULL,'             => '68',         # 0x44

WML.pm  view on Meta::CPAN

        'middle'    => '147',            # 0x93
        'nowrap'    => '148',            # 0x94
        'onpick'    => '149',            # 0x95
        'onenterbackward' => '150',      # 0x96
        'onenterforward'  => '151',      # 0x97
        'ontimer'   => '152',            # 0x98
        'options'   => '153',            # 0x99
        'password'  => '154',            # 0x9A
        'reset'     => '155',            # 0x9B
        'NULL'      => '156',            # 0x9C
        'text'      => '157',            # 0x9D

WML.pm  view on Meta::CPAN

        'input'  => '1',                 
        'noop'   => '1',                 
        'prev'   => '1',                 
        'img'    => '1',                 
        'meta'   => '1',                 
        'timer'  => '1',                 
        'setvar' => '1');

# HTML->WML conversion constants
# Ignore these HTML and iMode tags completely.
my %IGNORE_TAG = map {$_ => 1} qw(abbr acronym address applet area basefont

WML.pm  view on Meta::CPAN

### Method: card
# make a complete WML card
####
sub card {
    my ($self,@p) = &CGI::self_or_default(@_);
    my ($id,$title,$content,$ontimer,$timer,$onenterforward,$onenterbackward,
	$newcontext,$ordered,$class,$lang) =
        rearrange([ID,TITLE,CONTENT,ONTIMER,TIMER,ONENTERFORWARD,ONENTERBACKWARD,NEWCONTEXT,ORDERED,CLASS,LANG],@p);
    
    my @ret;
 
    push(@ret,qq(\n<card id="$id"));
    push(@ret,qq(title="$title")) if (defined $title);
    push(@ret,qq(newcontext="$newcontext")) if (defined $newcontext);
    push(@ret,qq(ontimer="$ontimer")) if (defined $ontimer);
    push(@ret,qq(onenterforward="$onenterforward"))if(defined $onenterforward);
    push(@ret,qq(onenterbackward="$onenterbackward"))if(defined $onenterbackward);
    push(@ret,qq(xml:lang="$lang")) if (defined $lang);
    push(@ret,qq(ordered="$ordered")) if (defined $ordered);
    push(@ret,qq(class="$class")) if (defined $class);

    push(@ret,qq(>));
    push(@ret,qq($timer)) if (defined $timer);
    push(@ret,qq( $content </card>)) if (defined $content);

    return join (" ",@ret);
}

WML.pm  view on Meta::CPAN


sub back {
   &prev;
}

### Method: timer
# Make a WML timer element
####
sub timer {
    my ($self,@p) = @_;
    my ($name,$value) = rearrange([NAME,VALUE],@p);
    
    return qq(<timer name="$name" value="$value"/>);
}

#### Method: end_wml
# End an WML document.
# Trivial method for completeness.  Just returns "</wml>"

WML.pm  view on Meta::CPAN

=over 2

=item B<card()>

Cards are created whole, by passing paramaters to the card() method, as
well as the card attributes, a timer may be added to the start of the 
card.

$query->card(-id=>"card_id",
             -title=>"First Card",
             -ontimer=>"#next_card",
             -timer=>$query->C<timer>(-name=>"timer1",-value=>"30"),
             -newcontext=>"true",
             -onenterforward=>"#somecard",
             -onenterbackward=>"#othercard",
             -content=>"<p>Hello WAP world</p>");

WML.pm  view on Meta::CPAN


$content =  $query->p("Hello WAP world");

$query->card(-id=>"card_id",
             -title=>"First Card",
             -ontimer=>"#next_card",
             -timer=>$query->C<timer>(-name=>"timer1",-value=>"30"),
             -newcontext=>"true",
             -onenterforward=>"#somecard",
             -onenterbackward=>"#othercard",
             -content=>$content);

WML.pm  view on Meta::CPAN


$query->template(-content=>$query->prev(-label=>"Go Back"));

=head2 TIMERS

A card timer is used with the card() method to trigger an action, the
function takes two arguments, the name of the timer and it's value in
milliseconds.

$query->timer(-name=>"mytimer",
              -value=>"30");

=head2 GO BLOCKS

A E<lt>go block is created either as a single line

WML.pm  view on Meta::CPAN

              -emptyok=>"false");

=head2 ONEVENT

An B<onevent> element may contain one of 'go','prev','noop' or 'refresh'
and be of type 'onenterforward', 'onenterbackward' or 'ontimer'.

$query->onevent(-type=>"onenterforward",
                -content=>qq(<refresh>
                              <setvar name="x" value="1"/>
                             </refresh>));

 view all matches for this distribution


CGI-WebToolkit

 view release on metacpan or  search on metacpan

t/private/javascripts/prototype.js  view on Meta::CPAN


    this.registerCallback();
  },

  registerCallback: function() {
    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
  },

  execute: function() {
    this.callback(this);
  },

  stop: function() {
    if (!this.timer) return;
    clearInterval(this.timer);
    this.timer = null;
  },

  onTimerEvent: function() {
    if (!this.currentlyExecuting) {
      try {

t/private/javascripts/prototype.js  view on Meta::CPAN

    this.onTimerEvent();
  },

  stop: function() {
    this.updater.options.onComplete = undefined;
    clearTimeout(this.timer);
    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
  },

  updateComplete: function(response) {
    if (this.options.decay) {
      this.decay = (response.responseText == this.lastText ?
        this.decay * this.options.decay : 1);

      this.lastText = response.responseText;
    }
    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
  },

  onTimerEvent: function() {
    this.updater = new Ajax.Updater(this.container, this.url, this.options);
  }

t/private/javascripts/prototype.js  view on Meta::CPAN


(function() {
  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
     Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */

  var timer;

  function fireContentLoadedEvent() {
    if (document.loaded) return;
    if (timer) window.clearTimeout(timer);
    document.loaded = true;
    document.fire('dom:loaded');
  }

  function checkReadyState() {

t/private/javascripts/prototype.js  view on Meta::CPAN

  }

  function pollDoScroll() {
    try { document.documentElement.doScroll('left'); }
    catch(e) {
      timer = pollDoScroll.defer();
      return;
    }
    fireContentLoadedEvent();
  }

  if (document.addEventListener) {
    document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
  } else {
    document.observe('readystatechange', checkReadyState);
    if (window == top)
      timer = pollDoScroll.defer();
  }

  Event.observe(window, 'load', fireContentLoadedEvent);
})();

 view all matches for this distribution


CGISession

 view release on metacpan or  search on metacpan

Session/CVS/Base/LDAPSession.pm  view on Meta::CPAN


=item CGI::LDAPSession::auto_refresh_cookie($;$)

Accessor method.  Normally the cookie will expire X seconds after it is created, where X is
specified by CGI::LDAPSession::cookie_expiration.  Whenever the cookie is refreshed this
timer resets.  Setting this variable to a non-zero value causes the cookie to be refreshed
every time that it is successfully verified.

=cut

sub auto_refresh_cookie($;$) { my $self=shift; @_ ? $self->{auto_refresh_cookie}=shift : $self->{auto_refresh_cookie}; }

 view all matches for this distribution


CLI-Startup

 view release on metacpan or  search on metacpan

Debian_CPANTS.txt  view on Meta::CPAN

"libb-keywords-perl", "B-Keywords", "1.09", "0", "0"
"libb-perlreq-perl", "rpm-build-perl", "0.74", "0", "1"
"libb-utils-perl", "B-Utils", "0.13", "0", "0"
"libbarcode-code128-perl", "Barcode-Code128", "2.01", "0", "1"
"libbenchmark-progressbar-perl", "Benchmark-ProgressBar", "0.00001", "0", "0"
"libbenchmark-timer-perl", "Benchmark-Timer", "0.7102", "0", "0"
"libbiblio-citation-parser-perl", "Biblio-Citation-Parser", "1.10", "0", "1"
"libbiblio-endnotestyle-perl", "Biblio-EndnoteStyle", "0.05", "0", "0"
"libbio-asn1-entrezgene-perl", "unknown", "1.091", "0", "0"
"libbio-primerdesigner-perl", "Bio-PrimerDesigner", "0.07", "0", "0"
"libbio-scf-perl", "Bio-SCF", "1.03", "1", "0"

Debian_CPANTS.txt  view on Meta::CPAN

"libtemplate-plugin-number-format-perl", "Template-Plugin-Number-Format", "1.02", "0", "0"
"libtemplate-plugin-textile2-perl", "Template-Plugin-Textile2", "1.21", "0", "0"
"libtemplate-plugin-yaml-perl", "Template-Plugin-YAML", "1.23", "0", "0"
"libtemplate-provider-encoding-perl", "Template-Provider-Encoding", "0.10", "0", "0"
"libtemplate-provider-fromdata-perl", "Template-Provider-FromDATA", "0.10", "0", "0"
"libtemplate-timer-perl", "Template-Timer", "1.00", "1", "0"
"libtemplate-tiny-perl", "Template-Tiny", "0.11", "0", "0"
"libterm-encoding-perl", "Term-Encoding", "0.02", "0", "0"
"libterm-progressbar-perl", "Term-ProgressBar", "2.09", "0", "1"
"libterm-prompt-perl", "Term-Prompt", "1.04", "0", "0"
"libterm-query-perl", "Term-Query", "2.0", "0", "1"

 view all matches for this distribution


COPS-Client

 view release on metacpan or  search on metacpan

examples/new_cops_test.pl  view on Meta::CPAN

			Service_Type		=> 'DOCSIS Service Class Name',
			ServiceClassName 	=> 'S_down'
			]
			);

	my $timer= time();

	$cops_client->rks_set (
			[
			PRKS_IPAddress		=> '192.168.50.2',
			PRKS_Port		=> 2000,
			PRKS_Flags		=> 1,
			SRKS_IPAddress		=> 0,
			SRKS_Port		=> 0,
			SRKS_Flags		=> 0,
			BCID_TimeStamp		=> $timer,
			BCID_ElementID		=> '99999999',
			BCID_TimeZone		=> '00000000',
			BCID_EventCounter	=> 12347890
			]
			);

 view all matches for this distribution


CORBA-MICO

 view release on metacpan or  search on metacpan

gtkmico.cc  view on Meta::CPAN


    event->cb->callback (event->disp, event->ev);
}

gint
GtkDispatcher::timer_callback (gpointer _event)
{
    TimerEvent *event = (TimerEvent *)_event;
    GtkDispatcher *disp = event->disp;

    list<TimerEvent *>::iterator i;

gtkmico.cc  view on Meta::CPAN

void
GtkDispatcher::tm_event (CORBA::DispatcherCallback *cb, CORBA::ULong tmout)
{
    TimerEvent *ev = new TimerEvent (this, 0, cb);

    ev->tag = funcs.gtk_timeout_add (tmout, timer_callback, (gpointer)ev);
    tevents.push_back (ev);
}

void
GtkDispatcher::remove (CORBA::DispatcherCallback *cb, Event e)

 view all matches for this distribution


CPAN-FindDependencies

 view release on metacpan or  search on metacpan

t/cache/Tie-Scalar-Decay-1.1.1-malicious/Time-HiRes-1.9719.meta  view on Meta::CPAN

--- #YAML:1.0
name:               Time-HiRes
version:            1.9719
abstract:           High resolution alarm, sleep, gettimeofday, interval timers
author:
    - Jarkko Hietaniemi <jhi@iki.fi>
license:            unknown
distribution_type:  module
configure_requires:

 view all matches for this distribution


CPAN-Testers-ParseReport

 view release on metacpan or  search on metacpan

t/var/nntp-testers/1433311  view on Meta::CPAN

#   Failed test 'Command completed successfully'
#   at t/04-fork.t line 18.
#          got: '256'
#     expected: '0'

#   Failed test 'Parent managed to use the timer'
#   at t/04-fork.t line 22.
#                   ''
#     doesn't match '(?-xism:\(parent\))'

#   Failed test 'Child managed to use the timer'
#   at t/04-fork.t line 23.
#                   ''
#     doesn't match '(?-xism:\(child\))'
'-' is not recognized as an internal or external command,
operable program or batch file.

 view all matches for this distribution


CPAN-Testers-WWW-Admin

 view release on metacpan or  search on metacpan

vhost/html/js/email_handler.js  view on Meta::CPAN

var select_open = false;
var last_keypress = undefined;
var timer_id = undefined;
var timer_arg = undefined;

function populate_emails( event ) {
	var str = '';
	var evt = (event) ? event : ((window.event) ? window.event : null);
	if (! evt) { 
		if (timer_arg != undefined) {
			str = timer_arg;
		} else {
			return;
		}
	} else {
		var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);

vhost/html/js/email_handler.js  view on Meta::CPAN

                  ) {
			str = elem.value + String.fromCharCode( char );
		}
	}

	if (timer_id != undefined) {
		clearTimeout( timer_id );
		timer_id = undefined;
		timer_arg = undefined;
	}
	if (last_keypress == undefined) {
		last_keypress = new Date();
	} else {
		// if the last keypress was less than half a second ago, 	
		// wait to see if we get any more input
		var now = new Date();
		if (now.getTime() - last_keypress.getTime() < 500) {
			timer_arg = str;
			timer_id = setTimeout( "populate_emails()", 501 );
			return;
		}
	}

	var list = $("emaillist");

vhost/html/js/email_handler.js  view on Meta::CPAN

	var url = '';
	if (str.length > 2) {
		url = 'email_search.cgi?str=' + str;
	}
	if (url != '' && select_open == false) {
		clearTimeout( timer_id );
		last_keypress = undefined;
		select_open = true;
		new Ajax.Request( url, {
			method: 'get',
			onSuccess: add_emails_to_list

 view all matches for this distribution


CPAN-Testers-WWW-Statistics

 view release on metacpan or  search on metacpan

t/data/cpanstats-test.json  view on Meta::CPAN

{"test":{"count":{"entries":100,"reports":100,"posters":"182","distros":0},"pass":{"MacPPC":{"5.4.0":{"all":{"Net-Whois":1,"URI":1,"Storable":1,"Mac-Conversions":1,"Digest-MD5":1}}},"PA-RISC1.1":{"5.5.3":{"all":{"DBD-Oracle":1,"Curses":1}},"5.4.4":{"...

 view all matches for this distribution


CPAN

 view release on metacpan or  search on metacpan

lib/CPAN/FirstTime.pm  view on Meta::CPAN

=item inactivity_timeout

Sometimes you may wish to leave the processes run by CPAN alone
without caring about them. Because the Makefile.PL or the Build.PL
sometimes contains question you're expected to answer, you can set a
timer that will kill a 'perl Makefile.PL' process after the specified
time in seconds.

If you set this value to 0, these processes will wait forever. This is
the default and recommended setting.

 view all matches for this distribution


CPANPLUS

 view release on metacpan or  search on metacpan

inc/bundle/IPC/Cmd.pm  view on Meta::CPAN

	  },
	  'terminate_on_signal' => 'HUP',
	  });

Combined with C<stdout_handler> and C<stderr_handler> allows terminating
external command based on its output. Could also be used as a timer
without engaging with L<alarm> (signals).

Remember that this code could be called every millisecond (depending
on the output which external command generates), so try to make it
as lightweight as possible.

 view all matches for this distribution


CPP-catch-test

 view release on metacpan or  search on metacpan

src/catch.hpp  view on Meta::CPAN

        double durationInSeconds;
    };

} // end namespace Catch

// #included from: catch_timer.h
#define TWOBLUECUBES_CATCH_TIMER_H_INCLUDED

#ifdef _MSC_VER

namespace Catch {

src/catch.hpp  view on Meta::CPAN

        SectionInfo m_info;

        std::string m_name;
        Counts m_assertions;
        bool m_sectionIncluded;
        Timer m_timer;
    };

} // end namespace Catch

#ifdef CATCH_CONFIG_VARIADIC_MACROS

src/catch.hpp  view on Meta::CPAN

            try {
                m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal );

                seedRng( *m_config );

                Timer timer;
                timer.start();
                if( m_reporter->getPreferences().shouldRedirectStdOut ) {
                    StreamRedirect coutRedir( Catch::cout(), redirectedCout );
                    StdErrRedirect errRedir( redirectedCerr );
                    invokeActiveTestCase();
                }
                else {
                    invokeActiveTestCase();
                }
                duration = timer.getElapsedSeconds();
            }
            catch( TestFailureException& ) {
                // This just means the test was aborted due to failure
            }
            catch(...) {

src/catch.hpp  view on Meta::CPAN

    }
    void LegacyReporterAdapter::skipTest( TestCaseInfo const& ) {
    }
}

// #included from: catch_timer.hpp

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-long-long"
#endif

src/catch.hpp  view on Meta::CPAN


    Section::Section( SectionInfo const& info )
    :   m_info( info ),
        m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )
    {
        m_timer.start();
    }

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996) // std::uncaught_exception is deprecated in C++17
#endif
    Section::~Section() {
        if( m_sectionIncluded ) {
            SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() );
            if( std::uncaught_exception() )
                getResultCapture().sectionEndedEarly( endInfo );
            else
                getResultCapture().sectionEnded( endInfo );
        }

 view all matches for this distribution


CPP-catch

 view release on metacpan or  search on metacpan

src/catch.hpp  view on Meta::CPAN

    };

} // end namespace Catch

// end catch_section_info.h
// start catch_timer.h

#include <cstdint>

namespace Catch {

src/catch.hpp  view on Meta::CPAN

        auto getElapsedSeconds() const -> double;
    };

} // namespace Catch

// end catch_timer.h
#include <string>

namespace Catch {

    class Section : NonCopyable {

src/catch.hpp  view on Meta::CPAN

        SectionInfo m_info;

        std::string m_name;
        Counts m_assertions;
        bool m_sectionIncluded;
        Timer m_timer;
    };

} // end namespace Catch

#define INTERNAL_CATCH_SECTION( ... ) \

src/catch.hpp  view on Meta::CPAN


        std::string m_name;
        std::size_t m_count = 0;
        std::size_t m_iterationsToRun = 1;
        uint64_t m_resolution;
        Timer m_timer;

        static auto getResolution() -> uint64_t;
    public:
        // Keep most of this inline as it's on the code path that is being timed
        BenchmarkLooper( StringRef name )
        :   m_name( name ),
            m_resolution( getResolution() )
        {
            reportStart();
            m_timer.start();
        }

        explicit operator bool() {
            if( m_count < m_iterationsToRun )
                return true;

src/catch.hpp  view on Meta::CPAN


    void BenchmarkLooper::reportStart() {
        getResultCapture().benchmarkStarting( { m_name } );
    }
    auto BenchmarkLooper::needsMoreIterations() -> bool {
        auto elapsed = m_timer.getElapsedNanoseconds();

        // Exponentially increasing iterations until we're confident in our timer resolution
        if( elapsed < m_resolution ) {
            m_iterationsToRun *= 10;
            return true;
        }

src/catch.hpp  view on Meta::CPAN

        m_shouldReportUnexpected = true;
        m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal };

        seedRng(*m_config);

        Timer timer;
        CATCH_TRY {
            if (m_reporter->getPreferences().shouldRedirectStdOut) {
#if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT)
                RedirectedStdOut redirectedStdOut;
                RedirectedStdErr redirectedStdErr;

                timer.start();
                invokeActiveTestCase();
                redirectedCout += redirectedStdOut.str();
                redirectedCerr += redirectedStdErr.str();
#else
                OutputRedirect r(redirectedCout, redirectedCerr);
                timer.start();
                invokeActiveTestCase();
#endif
            } else {
                timer.start();
                invokeActiveTestCase();
            }
            duration = timer.getElapsedSeconds();
        } CATCH_CATCH_ANON (TestFailureException&) {
            // This just means the test was aborted due to failure
        } CATCH_CATCH_ALL {
            // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions
            // are reported without translation at the point of origin.

src/catch.hpp  view on Meta::CPAN


    Section::Section( SectionInfo const& info )
    :   m_info( info ),
        m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )
    {
        m_timer.start();
    }

    Section::~Section() {
        if( m_sectionIncluded ) {
            SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() };
            if( uncaught_exceptions() )
                getResultCapture().sectionEndedEarly( endInfo );
            else
                getResultCapture().sectionEnded( endInfo );
        }

src/catch.hpp  view on Meta::CPAN

        return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec();
    }

} // namespace Catch
// end catch_test_spec_parser.cpp
// start catch_timer.cpp

#include <chrono>

static const uint64_t nanosecondsInSecond = 1000000000;

src/catch.hpp  view on Meta::CPAN

    auto Timer::getElapsedSeconds() const -> double {
        return getElapsedMicroseconds()/1000000.0;
    }

} // namespace Catch
// end catch_timer.cpp
// start catch_tostring.cpp

#if defined(__clang__)
#    pragma clang diagnostic push
#    pragma clang diagnostic ignored "-Wexit-time-destructors"

 view all matches for this distribution


CPU-Emulator-Z80

 view release on metacpan or  search on metacpan

example/machine.pl  view on Meta::CPAN

#!/usr/local/bin/perl -w

use strict;

use CPU::Emulator::Z80;
use Time::HiRes qw(setitimer ITIMER_VIRTUAL ITIMER_REAL);
use Term::ReadKey;
use IO::Scalar;
use Data::Dumper;

my $cpu = CPU::Emulator::Z80->new( # RAM is 64K of zeroes

example/machine.pl  view on Meta::CPAN

$cpu->add_output_device(address => 0x00, function => \&mem_bank);
$cpu->add_output_device(address => 0x01, function => \&mem_unbank);
$cpu->add_output_device(address => 0x02, function => \&io_wr_stdout);
$cpu->add_output_device(address => 0xFF, function => \&hw_start_clock);

setitimer(ITIMER_VIRTUAL, 1, 1);
# setitimer(ITIMER_REAL, 1, 0.2);
$SIG{VTALRM} = sub {
# $SIG{ALRM} = sub {
    my $key = ReadKey(-1);
    if($key) {
        # print "Got char $key\n";

 view all matches for this distribution


CPU-Z80-Disassembler

 view release on metacpan or  search on metacpan

t/data/zx48.asm  view on Meta::CPAN

                                ; if B is higher then bit on tape was set.
                                ; if <= then bit on tape is reset. 

        RL      L               ; rotate the carry bit into L.

        LD      B,$B0           ; reset the B timer byte.
        JP      NC,L05CA        ; JUMP back to LD-8-BITS

;   when carry set then marker bit has been passed out and byte is complete.

        LD      A,H             ; fetch the running parity byte.

 view all matches for this distribution


CSS-Croco

 view release on metacpan or  search on metacpan

Debian_CPANTS.txt  view on Meta::CPAN

"libb-keywords-perl", "B-Keywords", "1.09", "0", "0"
"libb-perlreq-perl", "rpm-build-perl", "0.71", "0", "0"
"libb-utils-perl", "B-Utils", "0.07", "1", "0"
"libbarcode-code128-perl", "Barcode-Code128", "2.01", "0", "0"
"libbenchmark-progressbar-perl", "Benchmark-ProgressBar", "0.00001", "0", "0"
"libbenchmark-timer-perl", "Benchmark-Timer", "0.7102", "0", "0"
"libbiblio-citation-parser-perl", "Biblio-Citation-Parser", "1.10", "0", "0"
"libbiblio-endnotestyle-perl", "Biblio-EndnoteStyle", "0.05", "0", "0"
"libbio-asn1-entrezgene-perl", "Bio-ASN1-EntrezGene", "1.091", "0", "0"
"libbio-primerdesigner-perl", "Bio-PrimerDesigner", "0.07", "0", "0"
"libbio-scf-perl", "Bio-SCF", "1.01", "1", "0"

Debian_CPANTS.txt  view on Meta::CPAN

"libtemplate-plugin-javascript-perl", "Template-Plugin-JavaScript", "0.01", "0", "0"
"libtemplate-plugin-textile2-perl", "Template-Plugin-Textile2", "1.21", "0", "0"
"libtemplate-plugin-yaml-perl", "Template-Plugin-YAML", "1.23", "0", "0"
"libtemplate-provider-encoding-perl", "Template-Provider-Encoding", "0.10", "0", "0"
"libtemplate-provider-fromdata-perl", "Template-Provider-FromDATA", "0.10", "0", "0"
"libtemplate-timer-perl", "Template-Timer", "1.00", "1", "0"
"libterm-encoding-perl", "Term-Encoding", "0.02", "0", "0"
"libterm-progressbar-perl", "Term-ProgressBar", "2.09", "0", "1"
"libterm-query-perl", "Term-Query", "2.0", "0", "0"
"libterm-readkey-perl", "TermReadKey", "2.30", "0", "0"
"libterm-readline-gnu-perl", "Term-ReadLine-Gnu", "1.19", "3", "0"

 view all matches for this distribution


CTKlib

 view release on metacpan or  search on metacpan

lib/CTK/Daemon.pm  view on Meta::CPAN

    sub run {
        my $self = shift;
        my $logger = $self->logger;
        my $quit_program = AnyEvent->condvar;

        # Create watcher timer
        my $watcher = AnyEvent->timer (after => 3, interval => 3, cb => sub {
            $quit_program->send unless $self->ok;
        });

        # Create process timer
        my $timer = AnyEvent->timer(after => 3, interval => 15, cb => sub {
            $quit_program->send unless $self->ok;

            $logger->log_info("[%d] Worker is running #%d", $self->{workerident}, $self->{workerpid});

        });

 view all matches for this distribution


Cache-LRU-WithExpires

 view release on metacpan or  search on metacpan

.proverc  view on Meta::CPAN

--exec "perl -Ilib -MTest::Flatten -MTest::Name::FromLine"
--timer
--merge
--trap
--color
-w

 view all matches for this distribution


Cache-Memcached-AnyEvent

 view release on metacpan or  search on metacpan

lib/Cache/Memcached/AnyEvent.pm  view on Meta::CPAN

        if ($self->{auto_reconnect} > $self->{_connect_attempts}->{ $server }++) {
            # XXX this watcher holds a reference to $self, which means
            # it will make your program wait for it to fire until 
            # auto_reconnect attempts have been made. 
            # if you need to close immediately, you need to call disconnect
            $self->{_reconnect}->{$server} = AE::timer $self->{reconnect_delay}, 0, sub {
                delete $self->{_reconnect}->{$server};
                $self->_connect_one($server);
            };
        }
    } else {

lib/Cache/Memcached/AnyEvent.pm  view on Meta::CPAN

    }
    my $cb = shift @{$self->{queue}};
    return unless $cb;

    my $guard = AnyEvent::Util::guard {
        my $t; $t = AE::timer 0, 0, sub {
            $self->{_is_draining}--;
            undef $t;
            $self->_drain_queue;
        };
    };

 view all matches for this distribution


Cache-Profile

 view release on metacpan or  search on metacpan

lib/Cache/Profile.pm  view on Meta::CPAN

    my ( $self, $class ) = @_;

    $self->SUPER::isa($class) or $self->cache->isa($class);
}

my @timer_names = qw(hit get set miss);

sub timer_names { @timer_names }

foreach my $method ( "all", @timer_names ) {
    my $count = "call_count_$method";

    has $count => (
        traits => [qw(Counter)],
        isa => "Num",

lib/Cache/Profile.pm  view on Meta::CPAN

}

sub reset {
    my $self = shift;

    foreach my $method ( $self->timer_names ) {
        foreach my $measure ( qw(real cpu) ) {
            $self->${\"reset_${method}_${measure}"};
        }
        $self->${\"reset_call_count_$method"};
    }

lib/Cache/Profile.pm  view on Meta::CPAN


    if ( $self->hit_count ) {
        $report .= sprintf "Hit rate: %0.2f%% (%d/%d)\n", ( $self->hit_rate * 100 ), $self->hit_count, $self->query_count;
    }

    foreach my $method ( $self->timer_names, "all" ) {
        if ( my $calls = $self->${\"call_count_$method"} ) {
            my %times;
            foreach my $measure ( qw(real cpu) ) {
                $times{$measure} = $self->${\"total_${measure}_time_${method}"};
            }

lib/Cache/Profile.pm  view on Meta::CPAN


If the overhead of C<get> and C<set> is higher, this will be bigger than 1.

=item reset

Resets the counters/timers.

=back

=head1 SUPPORT

 view all matches for this distribution


Cache-Sliding

 view release on metacpan or  search on metacpan

lib/Cache/Sliding.pm  view on Meta::CPAN

        L1      => {},
        L2      => {},
        t       => undef,
    };
    weaken(my $this = $self);
    $self->{t} = EV::timer $expire_after, $expire_after, sub { if ($this) {
        $this->{L2} = $this->{L1};
        $this->{L1} = {};
    } };
    return bless $self, $class;
}

lib/Cache/Sliding.pm  view on Meta::CPAN


Implement caching object using sliding time-based expiration strategy
(data in the cache is invalidated by specifying the amount of time the
item is allowed to be idle in the cache after last access time).

Use EV::timer, so this module only useful in EV-based applications,
because cache expiration will work only while you inside EV::loop.


=head1 INTERFACE 

 view all matches for this distribution


Cache

 view release on metacpan or  search on metacpan

t/file_fifo.t  view on Meta::CPAN

use Carp;

$SIG{__DIE__} = sub { confess @_; };

# This test suite requires total accuracy in ordering of removals over a short
# time period, so a higher resolution timer is required.
eval { require Time::HiRes }
	or plan skip_all => 'Time::HiRes is required for this test.';
Time::HiRes->export('Cache::File', 'time');
Time::HiRes->export('Cache::File::Entry', 'time');

 view all matches for this distribution


( run in 0.942 second using v1.01-cache-2.11-cpan-49f99fa48dc )