clock
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <time.h>
|
||
プログラムの実行に関連する実装定義の時代の始まり以来、プロセスで使用されるおおよそのプロセッサ時間を返します。秒に結果の値を変換するにはCLOCKS_PER_SECで割ります。 clock時代の始まりは、プログラムの開始と一致する必要がないため、clockに別の呼び出しによって返された二つの値の間の唯一の違いは意味があります。 CPUが他のプロセスによって共有されている場合、clock時間は壁時計より遅く進むことができる。現在のプロセスがマルチスレッド化されており、複数の実行コアが使用可能な場合は、clock時間は速く壁時計よりも前進することが.
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.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] パラメータ
(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 値を返します
その情報が利用できない場合、これまで(clock_t)(-1)またはプログラムによって使用されるプロセッサー時間.
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.
You can help to correct and verify the translation. Click here for instructions.
[編集] ノート
POSIX準拠のシステムでは、システム時計イドCLOCK_PROCESS_CPUTIME_IDとclock_gettimeは良好な分解能を提供しています.
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.
You can help to correct and verify the translation. Click here for instructions.
clock()によって返される値は、いくつかの実装で折り返すことがあります。たとえば、32ビットclock_tを積んだマシンで、それは2147秒または36分後にラップ.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.
You can help to correct and verify the translation. Click here for instructions.
clock()は、スレッドセーフである必要はありません.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.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例
| This section is incomplete Reason: no example |
[編集] も参照してください
| テキスト表現に tmオブジェクトを変換しますOriginal: converts a tm object to a textual representationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (機能) | |
| エポックからの経過時間など、システムの現在時刻を返します 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. (機能) | |
| C++ documentation for clock
| |