Advertisement
Guest User

examplecode alo

a guest
Jul 29th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.  public static void  startMessure(){
  2.         Thread thread1 = new Thread(new Runnable(){
  3.             public void run() {
  4.  
  5.                 try {
  6.                     threadLogger.logCall(instance.getClass().getMethod("startThread0"), "Thread1");//I have startThread0 to 2
  7.  
  8.                 }catch (Exception e) {
  9.                     e.printStackTrace();
  10.                 }
  11.             }
  12.         });
  13.         thread1.start();
  14.  
  15.  
  16.  
  17.   public long startThread0() {
  18.         startMessure()// want to give startMessure the name of startThread0 so I can use this method for all 3 startTThread //methods
  19.        
  20.  
  21.         try {
  22.             Thread.sleep(1000);
  23.         }
  24.         catch (InterruptedException e){
  25.  
  26.         }
  27.  
  28.         return System.currentTimeMillis() - startTime[0];
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement