Android Open Source - zoo_game Zoo Runnable






From Project

Back to project page zoo_game.

License

The source code is released under:

MIT License

If you think the Android project zoo_game listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.zoo;
//ww w.j  a v a  2s. co m
import com.example.zoo.Zoo;

import android.os.Message;
import android.util.Log;

public class ZooRunnable implements Runnable {
  
  
  
  @Override
  public void run() {
    
    
          
      if (Zoo.run_thread) {
        long sec = System.nanoTime()/(1000 * 1000 * 1000);
        
        //Log.d(Zoo.TAG, Long.toString(sec));
        
        Message msg = Zoo.handler.obtainMessage();
        msg.what = 1;
        msg.obj = sec;
        Zoo.handler.sendMessage(msg);
        
        Zoo.handler.postDelayed(this, Zoo.time_update_msec);
        
        } else {
          //return;
        }
    }         
  

}




Java Source Code List

com.example.zoo.ZooHandler.java
com.example.zoo.ZooRunnable.java
com.example.zoo.Zoo.java