분류없음2009.03.02 14:37

TVTimer Spec

setTime(long time)

 Sets when this specification should go off.
 For absolute specifications, this is a time in milliseconds since midnight, January 1, 1970 UTC.
 For delayed specifications, this is a delay time in milliseconds.


1. absolute

  setAbsolute(true)
 
 유틸함수
  setAbsoluteTime(long when) =  setAbsolute(true), setTime(when), setRepeat(false).


2. delayed

  setAbsolute(false);

 2-a. repeating

   setRepeat(true)
 
   2-a-i. regular
   
      setRegular(true)
     
   2-a-ii. non-regular
  
     setRegular(false);
    
 
 2-b. non-repeating
 
    setRepeat(false);
 
  setRegular(boolean)

  Regular specifications attempt to go off at fixed intervals of time, irrespective of system load or how long it takes to notify the listeners.
  Non-regular specifications wait the specified amount of time after all listeners have been called before going off again.
 
  유틸함수
  setDelayTime(long delay) = setAbsolute(false), setTime(delay), setRepeat(false);
 
 
결국 거의 항상 많이 쓰는 2가지 방식은 아래 3개 밖에 없다.
 
 
  절대시간에 한번
 
  setAbsoluteTime(long when);
 
  또는 반복일때
 
  setDelayTime(long delay), 한번일때
  setDelayTime(long delay)+ setRepeat(true); 반복일때.
 
  별거 아닌거 같은데, 매번 API 를 살펴야 하는 귀찮다. 외우자.

 


신고
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by 닙턱

티스토리 툴바