Blame |
Last modification |
View Log
| RSS feed
//package first_filter;
/**
* <p>Title: First XML filter</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: Retis Lab</p>
* @author not attributable
* @version 1.0
*/
public class timespec {
long tv_sec;
long tv_nsec;
public timespec() {
tv_sec=0;
tv_nsec=0;
}
void ADDUSEC2TIMESPEC(long t1) {
tv_nsec+=(t1%1000000)*1000;
tv_sec+=(tv_nsec / 1000000000)+(t1/1000000);
tv_nsec%=1000000000;
}
long TIMESPEC2USEC() {
return (tv_sec*1000000+tv_nsec/1000);
}
boolean TIMESPEC_A_GT_B(timespec t1) {
return (tv_sec>t1.tv_sec ||
(tv_sec==t1.tv_sec && tv_nsec>t1.tv_nsec));
}
}