sleep(0.1) ?

sleep(0.1) ?

Post by Albert Kagarman » Sun, 24 May 1998 04:00:00



Dear All!
Is it possible have sleep(x) when x non integer at Sun mashine?
I need something like sleep(0.1) sleep(0.01).
Please, reply in my mail-box too.

 
 
 

sleep(0.1) ?

Post by Glen Wil » Mon, 25 May 1998 04:00:00


select() is a portable way to delay for small periods.

: [posted and emailed]


: > Dear All!
: > Is it possible have sleep(x) when x non integer at Sun mashine?
: > I need something like sleep(0.1) sleep(0.01).
: > Please, reply in my mail-box too.

: nanosleep(2) is probably what you're looking for. Of course, man -k sleep
: would have helped too.

: --
: Justin Banks - Silicon Graphics Inc. Eagan, MN
: "To move the cabin, push button for wishing floor. If the cabin should enter
: more persons, each one should press a number of wishing floor. Driving is
: then going alphabetically by national order." -In a Belgrade Hotel Elevator

--


3Com - Carrier Systems R&D            http://www.poboxes.com/~gwiley

"UNIX _IS_ user friendly, its just picky about who its friends are."

*******************************************************************
* Any statements or opinions expressed by me are mine exclusively *
* and have nothing whatsoever to do with my employer...           *
*******************************************************************

 
 
 

sleep(0.1) ?

Post by T.E.Dicke » Mon, 25 May 1998 04:00:00


: Dear All!
: Is it possible have sleep(x) when x non integer at Sun mashine?
: I need something like sleep(0.1) sleep(0.01).
: Please, reply in my mail-box too.

usleep

--
Thomas E.*ey

http://www.veryComputer.com/

 
 
 

1. answer concerning sleep(0.1)

Hello,
another possibility to wait for 0.1 sec is to use the select command:

 struct timeval tv;

  tv.tv_sec = 0;
  tv.tv_usec = 100000;

  select(0, NULL, NULL, NULL, &tv);

Please enter the man pages for more details.
Greetings
Peter

PS: Perhaps one of you can answer my questions?!

at the moment I try to realize a serial connection between
a SUN computer and a PC, but the heterogenous system is not
the problem. As I read and heard, it seems that for example
a SUN ULTRA 1 with a RS-232C/RS-423 serial port might
have problems with baud rates higher than 19200.

1. question: Are there any drivers for Solaris 2.5.1 / 1.6
available to increase the baud rate, or other solutions?

Then I recognized by experiments that my SUN had no
problems to send and receive over port a with 38400, but
over port b I was able to send with 38400 but to receive
only with 19200.

2. question: Perhaps this "error" is the result of the entries
in /etc/remote where are some lines concerning the b-port
and Modem connection, or other reasons ?

Ok, last problem, first, the keyboard of another SUN
was connected to its serial port a, now it seems, that it is a problem
to receive over this port, sending is not a problem.

3. question: Perhaps there is a console-process which
gets any data that arrives at port a because of the previous
keyboard connection, how can I reconfigure it to be able
to receive data over a.

2. help with Smail

3. :Porting from SC3.0.1 to SC4.0.1

4. DOS commands under Solaris 2.5.1

5. Announcing mod_tcl 0.1; Apache/Tcl Integration

6. A 'net use' like utility?

7. KDE3.0.1 "Windows" key assignment

8. Boot trouble

9. esh 0.1

10. Anyone able to install xf4.0.1 on lombard?

11. Config mem to step around controllers in ISC3.0.1

12. xfree4.0.1+i810e Stuck at 1600x1200

13. atdisk2 package version 0.1