per page, with , order by , clip by
Results of 1 - 10 of about 22 for Timer (0.003 sec.)
timeit --- 小さなコードスニペットの実行時間計測 14864
timeit --- 小さなコードスニペットの実行時間計測 ソースコード: Lib/timeit.py このモジュールは、小さな Python コードの実行時間を簡単に計測する手段を提供します。 Command-Line Interface と、 Python から呼び出せるインターフェース の両方があります ... nterface このモジュールは 3 つの有用な関数と 1 つの公開クラスを持っています: timeit. timeit ( stmt='pass' , setup='pass' , timer=<default timer> , number=1000000 , globals=None ) 指定された文、 setup コード、 timer 関数で Timer インスタンスを作成し、 ... 間を指定します。 バージョン 3.5 で変更: 任意の globals 引数が追加されました。 timeit. repeat ( stmt='pass' , setup='pass' , timer=<default timer> , repeat=5 , number=1000000 , globals=None ) 指定された文、 setup コード、 timer 関数で Timer インスタンス ... globals 引数が追加されました。 バージョン 3.7 で変更: repeat のデフォルト値が 3 から 5 へ変更されました。 timeit. default_timer ( ) 浮動小数点数の秒数を返すデフォルトのタイマーで、常に time.perf_counter() でとなります。代わりに、 time.perf_counter_ns ...
https://man.mtool.work/python/3.14/library/timeit.html
タイマーファイル記述子 HOWTO 11935
タイマーファイル記述子 HOWTO リリース : 1.13 この HOWTO では、Linux のタイマーファイル記述子を Python で使う方法を説明します。 使用例 次の例は、タイマーファイル記述子を使って 1 秒に 2 回関数を実行する方法を示します。 # 実用的なスクリプトでは ... だが、 # ここでは簡単にするためブロッキングのタイマーを使う。 import os , time # タイマーファイル記述子を作成する fd = os . timerfd_create ( time . CLOCK_REALTIME ) # 1 秒後に初回の満了を迎え、その後は 0.5 秒間隔とする os . timerfd_settime ( fd , initi ... ントを 4 回処理する。 for _ in range ( 4 ): # タイマーが満了するまで read() はブロックする _ = os . read ( fd , 8 ) print ( "Timer expired" ) finally : # 忘れずにタイマーファイル記述子を閉じる。 os . close ( fd ) float 型による精度の低下を避けるため、タ ... EPOLLIN ) # ノンブロッキングモードでタイマーファイル記述子を作成する。 num = 3 fds = [] for _ in range ( num ): fd = os . timerfd_create ( time . CLOCK_REALTIME , flags = os . TFD_NONBLOCK ) fds . append ( fd ) # タイマーファイル記述子を読み取りイベン ...
https://man.mtool.work/python/3.14/howto/timerfd.html
GDB による C API 拡張と CPython 内部のデバッグ 9073
GDB による C API 拡張と CPython 内部のデバッグ このドキュメントでは、Python の GDB 拡張 python-gdb.py を GDB デバッガと組み合わせて、CPython 拡張や CPython インタープリタ自体をデバッグする方法を説明します。 クラッシュやデッドロックなどの低レ ... 2 0 0 0 9 0 1 0 0 0 3 9 7 6 0 0 0 1 8 0 6 0 0 0 0 2 8 0 0 0 5 0 4 0 6 0 0 2 1 0 0 0 0 0 4 5', 'gsd.impossible_hints': 0, 'timer.__absolute_start_time__': <float at remote 0x984b474>, 'gsd.hints': 0, 'timer.active_time': <float at remote 0x984b494>, ' ... 2 0 0 0 9 0 1 0 0 0 3 9 7 6 0 0 0 1 8 0 6 0 0 0 0 2 8 0 0 0 5 0 4 0 6 0 0 2 1 0 0 0 0 0 4 5', 'gsd.impossible_hints': 0, 'timer.__absolute_start_time__': <float at remote 0x984b474>, 'gsd.hints': 0, 'timer.active_time': <float at remote 0x984b494>, ' ...
https://man.mtool.work/python/3.14/howto/gdb_helpers.html
The Python Profilers 8535
The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how ... します。 exec ( command , globals , locals ) そしてプロファイル統計情報を run() 同様に収集します。 class profile. Profile ( timer = None , timeunit = 0.0 , subcalls = True , builtins = True ) This class is normally only used if more precise control ove ... r profiling is needed than what the cProfile.run() function provides. timer 引数に、コードの実行時間を計測するためのカスタムな時刻取得用関数を渡せます。これは現在時刻を表す単一の数値を返す関数でなけ ... ます: pr = cProfile . Profile ( your_integer_time_func , 0.001 ) As the cProfile.Profile class cannot be calibrated, custom timer functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might b ...
https://man.mtool.work/python/3.14/library/profile.html
10. 標準ライブラリをひとめぐり 8535
10. 標準ライブラリをひとめぐり 10.1. オペレーティングシステムとのインターフェース os モジュールは、オペレーティングシステムと対話するための多くの関数を提供しています: >>> import os >>> os . getcwd () # Return the current working directory ' ... 思うかもしれません。 timeit モジュールを使えば、パフォーマンスがほんの少し良いことがすぐに分かります: >>> from timeit import Timer >>> Timer ( 't=a; a=b; b=t' , 'a=1; b=2' ) . timeit () 0.57535828626024577 >>> Timer ( 'a,b = b,a' , 'a=1; b=2' ) . timeit ...
https://man.mtool.work/python/3.14/tutorial/stdlib.html
threading --- スレッドベースの並列処理 8282
threading --- スレッドベースの並列処理 ソースコード: Lib/threading.py このモジュールでは、高水準のスレッドインターフェースをより低水準 な _thread モジュールの上に構築しています。 利用可能な環境 : not WASI. このモジュールは WebAssembly では動 ... the operation in seconds, or fractions thereof. バージョン 3.1 で変更: 以前は、このメソッドは常に None を返していました。 Timer オブジェクト このクラスは、一定時間経過後に実行される活動、すなわちタイマ活動を表現します。 Timer は Thread のサブクラスで ... あり、自作のスレッドを構築した一例でもあります。 タイマは、スレッドと同様に Timer.start メソッドを呼び出して開始します。 cancel() メソッドを呼び出すと、処理を開始する前であればタイマを停止できます。 処理の ... にタイマが待つ時間は、指定された時間と厳密には一致しない場合があります。 例えば: def hello (): print ( "hello, world" ) t = Timer ( 30.0 , hello ) t . start () # 30 秒後に "hello, world" が表示される class threading. Timer ( interval , function , args ...
https://man.mtool.work/python/3.14/library/threading.html
並行実行 8097
並行実行 この章で説明するモジュールは、コードの並行実行をサポートします。 適切なツールは、実行するタスク (CPU バウンドか I/O バウンドか) と、好みの開発スタイル (イベント駆動の協調的マルチタスクかプリエンプティブマルチタスクか) によって異なり ... ト Lock オブジェクト RLock オブジェクト Condition オブジェクト Semaphore オブジェクト Semaphore の使用例 Event オブジェクト Timer オブジェクト Barrier オブジェクト with 文でのロック・条件変数・セマフォの使い方 multiprocessing --- プロセスベースの並列処 ...
https://man.mtool.work/python/3.14/library/concurrency.html
__future__ --- future 文の定義 8013
__future__ --- future 文の定義 ソースコード: Lib/__future__.py from __future__ import feature の形式でのインポートは future 文 の定義と呼ばれています。これらは特殊なケースで、 Python の新機能が標準になるリリースの前に Python コンパイラーが ... を扱うか。 PEP 236 - Back to the __future__ __future__ 機構の原案 他のマニュアルの関連ページ PHP halt_compiler() PHP swoole_timer_after() Linux JM g++(1) PHP dba.resources PHP gnupg_import() PHP gmp_import() ...
https://man.mtool.work/python/3.14/library/__future__.html
signal --- 非同期イベントにハンドラーを設定する 7912
signal --- 非同期イベントにハンドラーを設定する ソースコード: Lib/signal.py このモジュールでは Python でシグナルハンドラを使うための機構を提供します。 一般的なルール signal.signal() 関数で、シグナルを受信したときに実行するハンドラーを定義で ... NSIG 最大のシグナル番号に 1 を足した値です。 有効なシグナル番号を取得するには valid_signals() を使ってください。 signal. ITIMER_REAL 実時間でデクリメントするインターバルタイマーです。タイマーが発火したときに SIGALRM を送ります。 signal. ITIMER_VIRTUA ... L プロセスの実行時間だけデクリメントするインターバルタイマーです。タイマーが発火したときに SIGVTALRM を送ります。 signal. ITIMER_PROF プロセスの実行中と、システムがそのプロセスのために実行している時間だけデクリメントするインターバルタイマーです。ITIME ... ルマスクが置換されることを意味します。 Added in version 3.3. signal モジュールは一つの例外を定義します。 exception signal. ItimerError 背後の setitimer() または getitimer() 実装からエラーを通知するために送出されます。無効なインタバルタイマーや負の時間が ...
https://man.mtool.work/python/3.14/library/signal.html
faulthandler --- Python トレースバックをダンプする 7828
faulthandler --- Python トレースバックをダンプする Added in version 3.3. このモジュールには、Python のトレースバックを明示的にダンプしたり、フォールトの発生時、タイムアウト後、ユーザーシグナルの受信時にダンプしたりする関数があります。 SIGSE ... hing file buffers.) If the function is called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. トレースバックがダンプされるか cancel_dump_traceback_later() が呼び出されるまで、 file を開い ...
https://man.mtool.work/python/3.14/library/faulthandler.html
PREV 1 2 3 NEXT