/* 最小計測可能時間間隔チェック Ver 0.00 */ /* */ /* */ /* by Atsushi 1999/5/8 */ import java.applet.Applet; import java.awt.*; public class TimerCheck extends Applet { /* --- Field --- */ private long time; /* --- 初期化 --- */ public void init() { long t; time=0; for (int i=1;i<=5;i++) { t=System.currentTimeMillis(); while (t==System.currentTimeMillis()) ; time+=(System.currentTimeMillis()-t); } setBackground(Color.white); setLayout(new FlowLayout(FlowLayout.LEFT)); add(new Label("Timer : "+time/5.0/1000.0)); } /* --- Applet の動作 --- */ public void start() { } public void stop() { } /* --- 描画処理 --- */ public void update(Graphics g) { paint(g); } /* --- 終了処理 --- */ public void destroy() { removeAll(); } }