Code example for Time

Methods: setToNow, toString

0
    }   
       
    //ÔÚservice¶ËÌṩ¹«Ó÷½·¨¹©×é¼þµ÷Óà
    public String getSystemTime(){  
           
        Time t = new Time();  
        t.setToNow();  
        return t.toString();  
    }   
     
    //Ö±½Ó¼Ì³Ð Binder ¶ø²»ÊÇ IBinder,ÒòΪ Binder ʵÏÖÁË IBinder ½Ó¿Ú£¬ÕâÑùÎÒÃÇ¿ÉÒÔÉÙ×öºÜ¶à¹¤×÷¡£ 
    public class MyBinder extends Binder{  
    	public MyService getService()   
        {   
            return MyService.this;  //»ñÈ¡ Service ʵÀý
        }   
    }   
  //ÉùÃ÷ÀàMyBinderµÄʵÀýÒÔ¹©ÔÚonbindÖзµ»Ø 
    private MyBinder mBinder = new MyBinder();