FirstClassトップページ


 ヘルプの目次
このヘルプについて このヘルプについて
 
エンドユーザ向けヘルプ エンドユーザ向けヘルプ
Client Help クライアントヘルプ
Web Help Webアクセスヘルプ
ScreenReader Help スクリーンリーダ
Form フォーム
Synchronization 同期
Definitions 用語
container コンテナ
 
管理者向けヘルプ 管理者向けヘルプ
Administration サーバの管理
Internet Services インターネットサービス
Customization Tools カスタマイズツール(英語)
Administering OTSW OTSWの管理
OTSW Custodian OTSW Custodian
Using FirstClass ED FirstClass ED(英語)
 
バナー:
 
 PerfTimer
 
Purpose
The PerfTimer keyword class lets you set an incremental timer with millisecond accuracy.
Example
Dim t as PerfTimer
Dim i as Integer
Dim l as Integer

l= 10000000
Debug "Testing loop performance for " & l & " loops..."
t.Start
For i = 1 to l
Next i

Debug Str(t.ElapsedMs) & "ms"
Debug Str(t.ElapsedSeconds) & "s"
Debug "Approximately " & l/t.ElapsedSeconds & " loops per second"
Debug "Approximately " & l*2/t.ElapsedSeconds & " lines per second"

Debug "Testing 100ms loop with GiveTime..."
l = 0
t.Start
t.SetExpiryMs(100)
Do While NOT t.IsExpired
 l = l + 1
 GiveTime
Loop

Debug Str(t.ElapsedMs) & "ms"
Debug Str(t.ElapsedSeconds) & "s"
Debug Str(l) & " loops"

Debug "Testing 1s loop with GiveTime..."
l = 0
t.SetExpirySeconds(1)
Do While NOT t.IsExpired
 l = l + 1
 GiveTime
Loop

Debug Str(t.ElapsedMs) & "ms"
Debug Str(t.ElapsedSeconds) & "s"
Debug Str(l) & " loops"


 

Copyright(C) 2002-2012 FC Management Co. All Rights Reserved<