comparison src/main.c @ 387:de6060230ec5

fixed compiler warnings
author nadvornik
date Wed, 16 Apr 2008 20:32:44 +0000
parents 0226daf8c30b
children 2649a28d31b6
comparison
equal deleted inserted replaced
386:0226daf8c30b 387:de6060230ec5
117 return ((options->image.zoom_increment != 0) ? (gdouble)options->image.zoom_increment / 10.0 : 1.0); 117 return ((options->image.zoom_increment != 0) ? (gdouble)options->image.zoom_increment / 10.0 : 1.0);
118 } 118 }
119 119
120 const gchar *get_exec_time() 120 const gchar *get_exec_time()
121 { 121 {
122 static timestr[20]; 122 static gchar timestr[20];
123 static struct timeval start_tv = {0, 0}; 123 static struct timeval start_tv = {0, 0};
124 124
125 struct timeval tv = {0, 0}; 125 struct timeval tv = {0, 0};
126 126
127 gettimeofday(&tv, NULL); 127 gettimeofday(&tv, NULL);
135 { 135 {
136 tv.tv_usec += 1000000 - start_tv.tv_usec; 136 tv.tv_usec += 1000000 - start_tv.tv_usec;
137 tv.tv_sec -= 1; 137 tv.tv_sec -= 1;
138 } 138 }
139 139
140 g_snprintf(timestr, sizeof(timestr), "%5d.%06d", tv.tv_sec, tv.tv_usec); 140 g_snprintf(timestr, sizeof(timestr), "%5d.%06d", (int)tv.tv_sec, (int)tv.tv_usec);
141 141
142 return timestr; 142 return timestr;
143 } 143 }
144 144
145 /* 145 /*