package com.algobase.share.system;

import android.net.TrafficStats;

public class MyThread {

   Thread thread;

   public void run() {}

   public MyThread() 
   { thread = new Thread() {
        public void run() {
           TrafficStats.setThreadStatsTag(1);
           MyThread.this.run();
        }
     };
   }

   public void start() { thread.start(); }

   public void setDaemon(boolean b) { thread.setDaemon(b); }

   public void sleep(int msec) {
     try { Thread.sleep(msec); } catch (InterruptedException e) {}
   }

   public void join()  { 
     try { thread.join(); } catch (InterruptedException e) {}
   }

}


/*
public class MyThread extends Thread {

   public static void setTag(int x) {
       TrafficStats.setThreadStatsTag(x);
   }

   public MyThread() {
       super();
     //setDaemon(true);
   }


   public void sleep(int msec)
   { try { Thread.sleep(msec); }
     catch (InterruptedException e) { e.printStackTrace(); }
   }

   public void join1()
   { try { super.join(); }
     catch (InterruptedException e) { e.printStackTrace(); }
   }

}
*/
