Skip to content

Instantly share code, notes, and snippets.

@takke takke/gist:8143276
Last active Jan 1, 2016

What would you like to do?
// kick parallel (for benchmark)
class Box {
long total = 0;
int child = 0;
final Box box = new Box();
final int childCount = 10;
for (int i=0; i<childCount; i++) {
box.child ++;
new MyAsyncTask<Void, Void, Void>() {
protected Void doInBackground(Void... params) {
final long startTick = System.currentTimeMillis();
try {
} catch (TwitterException e) {
MyLog.e("twitter.showStatus, error");
} += System.currentTimeMillis() - startTick;
MyLog.dWithElapsedTime("twitter.showStatus, [{elapsed}ms]", startTick);
box.child --;
if (box.child == 0) {
MyLog.d("twitter.showStatus, average: [" + + "ms]");
return null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.