.\" -*- coding: UTF-8 -*- .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2001-04-01 by aeb .\" Modified 2003-07-23 by aeb .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH USLEEP 3 "15. September 2017" "" Linux\-Programmierhandbuch .SH BEZEICHNUNG usleep \- unterbricht die Ausführung für Mikrosekunden\-Intervalle .SH ÜBERSICHT .nf \fB#include \fP .PP \fBint usleep(useconds_t \fP\fIusec\fP\fB);\fP .fi .PP .in -4n Mit Glibc erforderliche Makros (siehe \fBfeature_test_macros\fP(7)): .in .PP \fBusleep\fP(): .ad l .RS 4 .PD 0 .TP 4 Seit Glibc 2.12: .nf (_XOPEN_SOURCE\ >=\ 500) && ! (_POSIX_C_SOURCE\ >=\ 200809L) || /* Glibc seit 2.19: */ _DEFAULT_SOURCE || /* Glibc\-Versionen <= 2.19: */ _BSD_SOURCE .TP 4 .fi .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED Vor Glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 .PD .RE .ad b .SH BESCHREIBUNG Die Funktion \fBusleep()\fP unterbricht die Ausführung des aufrufenden Threads für (wenigstens) \fIusec\fP Mikrosekunden. Das Schlafen kann durch Systemaktivitäten, die Zeit für die Bearbeitung des Aufrufs und die Auflösung der System\-Timer geringfügig verlängert werden. .SH RÜCKGABEWERT Die Funktion \fBusleep\fP() liefert im Erfolgsfall 0 zurück. Im Fehlerfall wird \-1 zurückgeliefert, wobei \fIerrno\fP gesetzt wird, um den Grund des Fehlers anzuzeigen. .SH FEHLER .TP \fBEINTR\fP Durch ein Signal unterbrochen, siehe \fBsignal\fP(7). .TP \fBEINVAL\fP \fIusec\fP ist größer als oder identisch zu 1000000. (Auf Systemen, auf denen das als Fehler angesehen wird.) .SH ATTRIBUTE Siehe \fBattributes\fP(7) für eine Erläuterung der in diesem Abschnitt verwandten Ausdrücke. .TS allbox; lb lb lb l l l. Schnittstelle Attribut Wert T{ \fBusleep\fP() T} Multithread\-Fähigkeit MT\-Safe .TE .SH "KONFORM ZU" 4.3BSD, POSIX.1\-2001. POSIX.1\-2001 erklärt diese Funktion für überholt und empfiehlt stattdessen die Verwendung von \fBnanosleep\fP(2). POSIX.1\-2008 entfernt die Spezifikation von \fBusleep\fP(). .PP In der ursprünglichen BSD\-Implementierung und glibc vor Version 2.2.2 ist der Rückgabewert dieser Funktion vom Typ \fIvoid\fP. Die POSIX\-Version gibt \fIint\fP zurück und dies gilt auch für den seit glibc 2.2.2 verwendeten Prototyp. .PP SUSv2 und POSIX.1\-2001 dokumentieren nur die Fehlernummer \fBEINVAL\fP. .SH ANMERKUNGEN Der Typ \fIuseconds_t\fP ist ein »unsigned integer« und kann Zahlen im Bereich [0,1.000.000] aufnehmen. Programme werden besser portierbar, wenn sie diesen Typ nie ausdrücklich erwähnen. Verwenden Sie .PP .in +4n .EX #include … unsigned int Mikrosekunden; … usleep(Mikrosekunden); .EE .in .PP Das Zusammenspiel dieser Funktion mit dem Signal \fBSIGALRM\fP und mit anderen Timer\-Funktionen wie \fBalarm\fP(2), \fBsleep\fP(3), \fBnanosleep\fP(2), \fBsetitimer\fP(2), \fBtimer_create\fP(2), \fBtimer_delete\fP(2), \fBtimer_getoverrun\fP(2), \fBtimer_gettime\fP(2), \fBtimer_settime\fP(2) und \fBualarm\fP(3) ist nicht festgelegt. .SH "SIEHE AUCH" \fBalarm\fP(2), \fBgetitimer\fP(2), \fBnanosleep\fP(2), \fBselect\fP(2), \fBsetitimer\fP(2), \fBsleep\fP(3), \fBualarm\fP(3), \fBtime\fP(7) .SH KOLOPHON Diese Seite ist Teil der Veröffentlichung 5.04 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts, Informationen, wie Fehler gemeldet werden können sowie die aktuelle Version dieser Seite finden sich unter \%https://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Patrick Rother und Martin Eberhard Schauer erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an die .MT debian-l10n-german@\:lists.\:debian.\:org Mailingliste der Übersetzer .ME .