SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Time-HiRes rpm build for : Old RedHat 7.X. For other distributions click perl-Time-HiRes.

Name : perl-Time-HiRes
Version : 1.65 Vendor : Jarkko Hietaniemi < jhi_iki_fi>
Release : 1 Date : 2004-11-25 14:10:51
Group : Applications/CPAN Source RPM : perl-Time-HiRes-1.65-1.src.rpm
Size : 0.06 MB
Packager : Peter Pramberger < peter_pramberger_member_fsf_org>
Summary : Time-HiRes - High resolution alarm, sleep, gettimeofday, interval timers
Description :
The C< Time::HiRes> module implements a Perl interface to the
C< usleep>, C< ualarm>, C< gettimeofday>, and C< setitimer>/C< getitimer>
system calls, in other words, high resolution time and timers. See the
L< /EXAMPLES> section below and the test scripts for usage; see your
system documentation for the description of the underlying
C< nanosleep> or C< usleep>, C< ualarm>, C< gettimeofday>, and
C< setitimer>/C< getitimer> calls.

If your system lacks C< gettimeofday()> or an emulation of it you don\'t
get C< gettimeofday()> or the one-argument form of C< tv_interval()>.
If your system lacks all of C< nanosleep()>, C< usleep()>, and
C< select()>, you don\'t get C< Time::HiRes::usleep()> or
C< Time::HiRes::sleep()>. If your system lacks both C< ualarm()> and
C< setitimer()> you don\'t get C< Time::HiRes::ualarm()> or
C< Time::HiRes::alarm()>.

If you try to import an unimplemented function in the C< use> statement
it will fail at compile time.

If your subsecond sleeping is implemented with C< nanosleep()> instead
of C< usleep()>, you can mix subsecond sleeping with signals since
C< nanosleep()> does not use signals. This, however, is not portable,
and you should first check for the truth value of
C< &Time::HiRes::d_nanosleep> to see whether you have nanosleep, and
then carefully read your C< nanosleep()> C API documentation for any
peculiarities. (There is no separate interface to call
C< nanosleep()> just use C< Time::HiRes::sleep()> or
C< Time::HiRes::usleep()> with small enough values.)

Unless using C< nanosleep> for mixing sleeping with signals, give
some thought to whether Perl is the tool you should be using for
work requiring nanosecond accuracies.

The following functions can be imported from this module.
No functions are exported by default.

=over 4

=item gettimeofday ()

In array context returns a two-element array with the seconds and
microseconds since the epoch. In scalar context returns floating
seconds like C< Time::HiRes::time()> (see below).

=item usleep ( $useconds )

Sleeps for the number of microseconds specified. Returns the number
of microseconds actually slept. Can sleep for more than one second,
unlike the C< usleep> system call. See also C< Time::HiRes::sleep()> below.

=item ualarm ( $useconds [, $interval_useconds ] )

Issues a C< ualarm> call; the C< $interval_useconds> is optional and
will be zero if unspecified, resulting in C< alarm>-like behaviour.

Note that the interaction between alarms and sleeps are unspecified.

=item tv_interval

tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] )

Returns the floating seconds between the two times, which should have
been returned by C< gettimeofday()>. If the second argument is omitted,
then the current time is used.

=item time ()

Returns a floating seconds since the epoch. This function can be
imported, resulting in a nice drop-in replacement for the C< time>
provided with core Perl; see the L< /EXAMPLES> below.

B< NOTE 1>: This higher resolution timer can return values either less
or more than the core C< time()>, depending on whether your platform
rounds the higher resolution timer values up, down, or to the nearest second
to get the core C< time()>, but naturally the difference should be never
more than half a second.

B< NOTE 2>: Since Sunday, September 9th, 2001 at 01:46:40 AM GMT, when
the C< time()> seconds since epoch rolled over to 1_000_000_000, the
default floating point format of Perl and the seconds since epoch have
conspired to produce an apparent bug: if you print the value of
C< Time::HiRes::time()> you seem to be getting only five decimals, not
six as promised (microseconds). Not to worry, the microseconds are
there (assuming your platform supports such granularity in the first
place). What is going on is that the default floating point format of
Perl only outputs 15 digits. In this case that means ten digits
before the decimal separator and five after. To see the microseconds
you can use either C< printf>/C< sprintf> with C< \"%.6f\">, or the
C< gettimeofday()> function in list context, which will give you the
seconds and microseconds as two separate values.

=item sleep ( $floating_seconds )

Sleeps for the specified amount of seconds. Returns the number of
seconds actually slept (a floating point value). This function can
be imported, resulting in a nice drop-in replacement for the C< sleep>
provided with perl, see the L< /EXAMPLES> below.

Note that the interaction between alarms and sleeps are unspecified.

=item alarm ( $floating_seconds [, $interval_floating_seconds ] )

The C< SIGALRM> signal is sent after the specified number of seconds.
Implemented using C< ualarm()>. The C< $interval_floating_seconds> argument
is optional and will be zero if unspecified, resulting in C< alarm()>-like
behaviour. This function can be imported, resulting in a nice drop-in
replacement for the C< alarm> provided with perl, see the L< /EXAMPLES> below.

B< NOTE 1>: With some combinations of operating systems and Perl
releases C< SIGALRM> restarts C< select()>, instead of interrupting it.
This means that an C< alarm()> followed by a C< select()> may together
take the sum of the times specified for the the C< alarm()> and the
C< select()>, not just the time of the C< alarm()>.

Note that the interaction between alarms and sleeps are unspecified.

=item setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] )

Start up an interval timer: after a certain time, a signal arrives,
and more signals may keep arriving at certain intervals. To disable
an \"itimer\", use C< $floating_seconds> of zero. If the
C< $interval_floating_seconds> is set to zero (or unspecified), the
timer is disabled B< after> the next delivered signal.

Use of interval timers may interfere with C< alarm()>, C< sleep()>,
and C< usleep()>. In standard-speak the \"interaction is unspecified\",
which means that I< anything> may happen: it may work, it may not.

In scalar context, the remaining time in the timer is returned.

In list context, both the remaining time and the interval are returned.

There are usually three or four interval timers available: the
C< $which> can be C< ITIMER_REAL>, C< ITIMER_VIRTUAL>, C< ITIMER_PROF>, or
C< ITIMER_REALPROF>. Note that which ones are available depends: true
UNIX platforms usually have the first three, but (for example) Win32
and Cygwin have only C< ITIMER_REAL>, and only Solaris seems to have
C< ITIMER_REALPROF> (which is used to profile multithreaded programs).

C< ITIMER_REAL> results in C< alarm()>-like behavior. Time is counted in
I< real time> that is, wallclock time. C< SIGALRM> is delivered when
the timer expires.

C< ITIMER_VIRTUAL> counts time in (process) I< virtual time> that is,
only when the process is running. In multiprocessor/user/CPU systems
this may be more or less than real or wallclock time. (This time is
also known as the I< user time>.) C< SIGVTALRM> is delivered when the
timer expires.

C< ITIMER_PROF> counts time when either the process virtual time or when
the operating system is running on behalf of the process (such as I/O).
(This time is also known as the I< system time>.) (The sum of user
time and system time is known as the I< CPU time>.) C< SIGPROF> is
delivered when the timer expires. C< SIGPROF> can interrupt system calls.

The semantics of interval timers for multithreaded programs are
system-specific, and some systems may support additional interval
timers. See your C< setitimer()> documentation.

=item getitimer ( $which )

Return the remaining time in the interval timer specified by C< $which>.

In scalar context, the remaining time is returned.

In list context, both the remaining time and the interval are returned.
The interval is always what you put in using C< setitimer()>.

=back

RPM found in directory: /packages/linux-pbone/archive/ftp.pramberger.at/systems/linux/contrib/rh73/i386

Content of RPM  Changelog  Provides Requires

Download
ftp.icm.edu.pl  perl-Time-HiRes-1.65-1.pp-rh73.i386.rpm
     Search for other platforms
perl-Time-HiRes-1.65-1.pp-rh73.sparc.rpm
perl-Time-HiRes-1.65-1.pp-rh73.alpha.rpm
perl-Time-HiRes-1.65-1.pp-rh73.ppc.rpm
perl-Time-HiRes-1.65-1.pp-rh73.ia64.rpm
perl-Time-HiRes-1.65-1.pp-rh73.s390.rpm

Provides :
HiRes.so
perl(Time::HiRes)
perl-Time-HiRes

Requires :
ld-linux.so.2
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(VersionedDependencies) <= 3.0.3-1
perl(vars)
libc.so.6(GLIBC_2.0)
perl(Exporter)
perl(DynaLoader)
libc.so.6(GLIBC_2.1.3)
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
perl(strict)
libc.so.6


Content of RPM :
/usr/lib/perl5/5.6.1/i386-linux/Time
/usr/lib/perl5/5.6.1/i386-linux/Time/HiRes.pm
/usr/lib/perl5/5.6.1/i386-linux/auto/Time
/usr/lib/perl5/5.6.1/i386-linux/auto/Time/HiRes
/usr/lib/perl5/5.6.1/i386-linux/auto/Time/HiRes/HiRes.so
/usr/share/doc/perl-Time-HiRes-1.65
/usr/share/doc/perl-Time-HiRes-1.65/Changes
/usr/share/doc/perl-Time-HiRes-1.65/README
/usr/share/doc/perl-Time-HiRes-1.65/TODO
/usr/share/doc/perl-Time-HiRes-1.65/fallback
/usr/share/doc/perl-Time-HiRes-1.65/fallback/const-c.inc
/usr/share/doc/perl-Time-HiRes-1.65/fallback/const-xs.inc
/usr/share/doc/perl-Time-HiRes-1.65/hints
/usr/share/doc/perl-Time-HiRes-1.65/hints/dec_osf.pl
/usr/share/doc/perl-Time-HiRes-1.65/hints/dynixptx.pl
/usr/share/doc/perl-Time-HiRes-1.65/hints/irix.pl
/usr/share/doc/perl-Time-HiRes-1.65/hints/sco.pl
/usr/share/doc/perl-Time-HiRes-1.65/hints/solaris.pl
/usr/share/doc/perl-Time-HiRes-1.65/hints/svr4.pl
/usr/share/man/man3/Time::HiRes.3pm.gz

 
ICM