Namespace
Varianti

clock

Da cppreference.com.
< c‎ | chrono

 
 
Data e ora utilità
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tempo di manipolazione
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
Formato conversioni
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
Costanti
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
Tipi
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();
Restituisce il tempo approssimativo processore utilizzato dal processo sin dall'inizio di una implementazione definita epoca che riguarda l'esecuzione del programma. Per convertire il valore risultato secondi dividere per CLOCKS_PER_SEC. Poiché l'inizio dell'era clock non deve coincidere con l'inizio del programma, solo la differenza tra due valori restituiti da diverse chiamate al clock è significativo. Se la CPU è condivisa da altri processi, il tempo clock possono avanzare più lento di orologio a muro. Se il processo corrente è multithread e più di un core di esecuzione è disponibile, il tempo clock possono avanzare più velocemente di orologio da parete.
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.

Indice

[modifica] Parametri

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

[modifica] Valore di ritorno

Tempo processore utilizzato dal programma finora o (clock_t)(-1) se tali informazioni non è più disponibile.
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.

[modifica] Note

In POSIX-compatibili, clock_gettime con id CLOCK_PROCESS_CPUTIME_ID orologio offre una migliore risoluzione.
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.
Il valore restituito da clock() può avvolgere attorno in alcune implementazioni. Ad esempio, su una macchina a 32-bit clock_t, avvolge dopo 2147 secondi o 36 minuti.
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() non è richiesto di essere 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.

[modifica] Esempio

[modifica] Vedi anche

converte un oggetto tm di una rappresentazione testuale
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.

(funzione) [edit]
restituisce l'ora corrente del sistema nel tempo dal epoca
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.

(funzione) [edit]