3 static struct timeval Add_Int_Timeval(int inc, struct timeval t){
5 r.tv_usec = t.tv_usec + (inc % 1000);
6 r.tv_sec = t.tv_sec + inc / 1000;
15 static struct timeval Add_Timeval_Int(struct timeval t, int inc){
17 r.tv_usec = t.tv_usec + (inc % 1000);
18 r.tv_sec = t.tv_sec + inc / 1000;
27 static struct timeval Subtract_Timeval_Int(struct timeval t, int inc){
29 r.tv_usec = t.tv_usec - (inc % 1000);
30 r.tv_sec = t.tv_sec - inc / 1000;
39 static struct timeval Divide_Timeval_Int(struct timeval t, int d){
41 r.tv_sec = t.tv_sec / d;
42 r.tv_usec = (t.tv_usec + 1000*( t.tv_sec % d )) / d;
47 Subtract_Timeval_Timeval
48 static int Subtract_Timeval_Timeval(struct timeval t1, struct timeval t2){
49 return(1000*(t1.tv_sec - t2.tv_sec) + (t1.tv_usec - t2.tv_usec) );
53 static int Compare_Timeval(struct timeval t1, struct timeval t2){
54 return( t1.tv_sec != t2.tv_sec ? t1.tv_sec - t2.tv_sec : t1.tv_usec - t2.tv_usec );
58 static struct timeval Timeval_Constructor(int s, int m){
66 static struct gs_string String_Constructor(char *l){
71 while(l[s.length] != '\0') s.length++;
79 str_assign_with_copy_in_tuple