.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" 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. .\" .\" Modified by Michael Haardt .\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith .\" Additions by Joseph S. Myers , 970909 .\" .\" Translated into German by Ralf Demmer, Translation & Consulting .\" rdemmer@rdemmer.de, http://www.rdemmer.de, Berlin, 24.05.99 .\" .TH TIME 2 "27. Mai 1999" "Linux 2.0.30" "Systemaufrufe" .SH BEZEICHNUNG time \- Zeit in Sekunden abfragen .SH "ÜBERSICHT" .B #include .sp .BI "time_t time(time_t *" t ); .SH BESCHREIBUNG .B time gibt die Zeit seit Beginn der "Computer-Epoche" (00:00:00 UTC, January 1, 1970) in Sekunden zurück. Ist .I t nicht NULL, wird auch der Rückgabewert im Speicher an der durch .IR t angegebenen Stelle abgelegt. .SH RÜCKGABEWERT Bei Erfolg wird die Zeit seit 1.1.1970, 00:00 Uhr in Sekunden zurückgegeben. Tritt ein Fehler auf, wird ((time_t)\-1) zurückgegeben und .I errno entsprechend gesetzt. .SH FEHLER .TP 0.8i .B EFAULT .I t zeigt außerhalb Ihres verfügbaren Speicherbereichs. .SH ANMERKUNGEN POSIX.1 definiert die Sekunden seit Anfang der "Computer-Epoche" als Wert der als Anzahl der Sekunden zwischen einem bestimmten Zeitpunkt und dem Anfang der "Computer-Epoche" interpretiert wird. Dabei wird eine Umrechnungsformel von der UTC auf Basis der ungenauen Annahme, dass Schaltsekunden ignoriert werden und alle durch 4 teilbaren Jahre Schaltjahre sind. Dieser Wert ist nicht die Anzahl der Sekunden zwischen diesem bestimmten Zeitpunkt und dem Anfang der "Computer-Epoche", wegen der Schaltsekunden und weil die Uhren nicht mit einer vorgegebenen Referenz synchronisiert werden müssen. Das Ziel dieser Festlegung ist eine konsistente Interpretation des Sekundenwertes seit Anfang der "Computer-Epoche". Siehe hierzu auch POSIX.1 Anhang B 2.2.2, für weitere Erläuterungen. .SH KONFORM ZU SVr4, SVID, POSIX, X/OPEN, BSD 4.3 .br Unter BSD 4.3 ist dieser Aufruf durch .BR gettimeofday (2) überholt. POSIX legt keine Fehlerbedingungen fest. .SH SIEHE AUCH .BR ctime (3), .BR date (1), .BR ftime (3), .BR gettimeofday (2).