How to stop a few seconds to run applications

I’m looking for a few seconds to stop the movement of the application.

By the way, so Shingurusureddopuroguramingu
Or multi-sync, it is not rather talk Soiu.

To temporarily stop the execution of app
I’ll define the following methods.

/ / Stop the execution method specified in milliseconds
public synchronized void sleep (long msec)
{
try
{
wait (msec);
} Catch (InterruptedException e) {}
}

Now, wherever you want to stop working

sleep (4000);

If we can try and stop us.

Incidentally, since the number of seconds specified in milliseconds,
In the above example makes the wait 04 seconds.

However, while waiting for me to accept that input method.

Volume control buttons and menus, buttons, etc. They did not respond back.

Measuring the elapsed time,
It is better made or better methods out of the loop.

Androidアプリ講座オープン
副業大学にAndroidアプリ作成講座がオープン。
アフィリエイトやドロップシッピングも学べるお得な大学。

innc.japan-power.biz
カテゴリー: Android アプリ 関連 情報   パーマリンク