Namensräume
Varianten
Aktionen

std::time

Aus cppreference.com
< cpp‎ | chrono‎ | c

 
 
 
 
C-style Datum und Uhrzeit Versorgungsunternehmen
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Zeit Manipulation
Original:
Time manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
difftime
time
clock
Format Konvertierungen
Original:
Format conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
asctime
ctime
strftime
wcsftime
gmtime
localtime
mktime
Konstanten
Original:
Constants
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
CLOCKS_PER_SEC
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
tm
time_t
clock_t
 
definiert in Header <ctime>
time_t time( std::time_t *time );
Gibt das aktuelle Kalenderjahr Zeit als std::time_t Objekt kodiert .
Original:
Returns the current calendar time encoded as a std::time_t object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

time -
Zeiger auf ein Objekt std::time_t, um die Zeit in oder NULL speichern
Original:
pointer to a std::time_t object to store the time in or NULL
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

Aktuelle Kalenderwoche Zeit als std::time_t Objekt auf Erfolg, (std::time_t)(-1) on error codiert. Wenn das Argument nicht NULL, wird der Rückgabewert auch das Objekt, auf die durch time gesetzt .
Original:
Current calendar time encoded as std::time_t object on success, (std::time_t)(-1) on error. If the argument is not NULL, the return value is also set to the object pointed by time.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Notes

Die Codierung der Kalenderzeit in std::time_t ist unbegrenzt, aber die meisten Systeme entsprechen POSIX specification und einen Wert zurückgeben integraler Typ, der die Anzahl der Sekunden seit der Epoche. Implementierungen, in denen std::time_t ist ein 32-Bit-Integer (viele historische Implementierungen) scheitern im Jahr 2038 .
Original:
The encoding of calendar time in std::time_t is unspecified, but most systems conform to POSIX specification and return a value of integral type holding the number of seconds since the Epoch. Implementations in which std::time_t is a 32-bit signed integer (many historical implementations) fail in the year 2038.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

#include <ctime>
#include <iostream>
 
int main()
{
    std::time_t result = std::time(NULL);
    std::cout << std::asctime(std::localtime(&result))
              << result << " seconds since the Epoch\n";
}

Output:

Wed Sep 21 10:27:52 2011
1316615272 seconds since the Epoch

[Bearbeiten] Siehe auch

wandelt Mal seit Epoche Kalender Zeit ausgedrückt als lokale Zeit
Original:
converts time since epoch to calendar time expressed as local time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
wandelt Mal seit Epoche zu Kalenderzeit ausgedrückt als Universal Coordinated Time
Original:
converts time since epoch to calendar time expressed as Universal Coordinated Time
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]
Uhr, die die systemweite Echtzeituhr zur Verfügung stellt
(Klasse) [edit]