Sponsored Content
Full Discussion: POSIX compliance...
Operating Systems OS X (Apple) POSIX compliance... Post 302976999 by drl on Sunday 10th of July 2016 09:43:01 PM
Old 07-10-2016
Hi.

Also:
Code:
            For delays of finer granularity than one second, the Time::HiRes
            module (from CPAN, and starting from Perl 5.8 part of the standard
            distribution) provides usleep(). You may also use Perl's
            four-argument version of select() leaving the first three
            arguments undefined, or you might be able to use the "syscall"
            interface to access setitimer(2) if your system supports it. See
            perlfaq8 for details.

Excerpt from perldoc -f sleep

For example:
Code:
#!/usr/bin/env perl

# @(#) p1       Demonstrate usleep;

use Time::HiRes qw( usleep nanosleep );

$microseconds = 2500000;
usleep($microseconds);

# nanosleep ($nanoseconds);

exit(0);

which would produce something like:
Code:
time ./p1

real    0m2.514s
user    0m0.008s
sys     0m0.000s

On an older OS/X:
Code:
OS, ker|rel, machine: Apple/BSD, Darwin 9.8.0, Power Macintosh
Distribution        : Mac OS X 10.5.8 (leopard, workstation)
perl 5.8.8

real    0m2.578s
user    0m0.045s
sys     0m0.021s

Best wishes ... cheers, drl

Last edited by drl; 07-10-2016 at 11:02 PM..
This User Gave Thanks to drl For This Post:
 

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sudo & Sox compliance

Hello, I am trying to convince my boss to stop allowing our users to login as root (superuser). Currently our users login to our unix server with their own account, then as needed, they will do an su and put in the root password. This scares me, for a bunch of reasons. Mainly, one is that we... (1 Reply)
Discussion started by: rwallaceisg
1 Replies

2. UNIX for Dummies Questions & Answers

man synopsis standard compliance

In different online sources, I found bits and pieces of information about those square and angular brackets and pipes. From what I have read, I can conclude it looks like this: 1. Options outside any brackets are mandatory 2. Options inside these < .. > are mandatory too 3. Options inside ... (4 Replies)
Discussion started by: vkleban
4 Replies

3. Cybersecurity

PCI DSS Compliance : Insecure Communication Has Been Detected

From the nessus scanner tool report i got below vulnerability PCI DSS Compliance : Insecure Communication Has Been Detected http://www.tenable.com/plugins/index.php?view=single&id=56208 As per the description given in above link - I am not able to understand How to find insecure port... (2 Replies)
Discussion started by: saurabh84g
2 Replies

4. Red Hat

Looking for PCI Compliance tool for Redhat Lix.

Hi i am in new to Linux world . I have been assigned to a project to find out a tool that will fulfill the PCI compliance for Linux servers for Audit process. anyone have any recommendation on that. Do Rad hat have any native application or plug-ins which we can use for that. (1 Reply)
Discussion started by: sahasuman
1 Replies

5. HP-UX

Password compliance setting

I need to set password compliance for some servers in my company. However, the requirements are that we need to set different password policies for 3 different user groups within the company. These are : System Users: i.e root, etc Batch/Application Users: oracle, bscs, etc Standard User:... (0 Replies)
Discussion started by: anaigini45
0 Replies
usleep(3C)						   Standard C Library Functions 						usleep(3C)

NAME
usleep - suspend execution for interval in microseconds SYNOPSIS
#include <unistd.h> int usleep(useconds_t useconds); DESCRIPTION
The usleep() function suspends the caller from execution for the number of microseconds specified by the useconds argument. The actual sus- pension time might be less than requested because any caught signal will terminate usleep() following execution of that signal's catching routine. The suspension time might be longer than requested by an arbitrary amount because of the scheduling of other activity in the sys- tem. If the value of useconds is 0, then the call has no effect. The use of the usleep() function has no effect on the action or blockage of any signal. In a multithreaded process, only the invoking thread is suspended from execution. RETURN VALUES
On completion, usleep() returns 0. There are no error retruns. ERRORS
No errors are returned. USAGE
The usleep() function is included for its historical usage. The nanosleep(3C) function is preferred over this function. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ SEE ALSO
nanosleep(3C), sleep(3C), attributes(5), standards(5) SunOS 5.11 5 Feb 2008 usleep(3C)
All times are GMT -4. The time now is 12:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy