get Thread Signature - Android java.lang

Android examples for java.lang:Thread

Description

get Thread Signature

Demo Code

import android.util.Log;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main{

    public static String getThreadSignature() {
        Thread t = Thread.currentThread();
        long l = t.getId();
        String name = t.getName();
        long p = t.getPriority();
        String gname = t.getThreadGroup().getName();
        return (name + ":(id)" + l + ":(priority)" + p + ":(group)" + gname);
    }/*from  w  w w.  j a  va2  s .  com*/

}

Related Tutorials