Espaces de noms
Variantes
Affichages
Actions

clock

De cppreference.com
< c‎ | chrono

 
 
Utilitaires date et l'heure
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La manipulation du temps
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
Les conversions de format
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
Constantes
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
 
Defined in header <time.h>
clock_t clock();
Renvoie l'heure approximative de processeur utilisé par le processus depuis le début d'une ère définie par l'implémentation liés à l'exécution du programme. Pour convertir une valeur en secondes résultat le diviser par CLOCKS_PER_SEC. Parce que le début de l'ère clock n'a pas à coïncider avec le début du programme, seule la différence entre deux valeurs renvoyées par les différents appels à clock est significatif. Si le CPU est partagée par d'autres procédés, le temps clock peut avancer plus lentement que l'horloge murale. Si le processus actuel est multithread et plus d'un noyau d'exécution est disponible, le temps clock peut progresser plus vite que l'horloge murale .
Original:
Returns the approximate processor time used by the process since the beginning of an implementation-defined era related to the program's execution. To convert result value to seconds divide it by CLOCKS_PER_SEC. Because the beginning of the clock era does not have to coincide with the start of the program, only the difference between two values returned by different calls to clock is meaningful. If the CPU is shared by other processes, clock time may advance slower than wall clock. If the current process is multithreaded and more than one execution core is available, clock time may advance faster than wall clock.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Paramètres

(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Retourne la valeur

Temps processeur utilisé par le programme à ce jour ou (clock_t)(-1) si cette information n'est pas disponible .
Original:
Processor time used by the program so far or (clock_t)(-1) if that information is unavailable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Notes

Sur les systèmes compatibles POSIX, clock_gettime avec id horloge CLOCK_PROCESS_CPUTIME_ID offre une meilleure résolution .
Original:
On POSIX-compatible systems, clock_gettime with clock id CLOCK_PROCESS_CPUTIME_ID offers better resolution.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La valeur retournée par clock() peut s'enrouler autour de certaines implémentations. Par exemple, sur une machine avec 32-bit clock_t, elle revient après 2147 secondes ou 36 minutes .
Original:
The value returned by clock() may wrap around on some implementations. For example, on a machine with 32-bit clock_t, it wraps after 2147 seconds or 36 minutes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clock() n'est pas tenu d'être thread-safe .
Original:
clock() is not required to be thread-safe.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Exemple

[modifier] Voir aussi

convertit un objet tm à une représentation textuelle
Original:
converts a tm object to a textual representation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]
retourne l'heure courante du système dans le temps depuis l'époque
Original:
returns the current time of the system as time since epoch
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]