Commit eac1c9b6 authored by Michael Smith's avatar Michael Smith

Don't return time as 0 to avoid division by zero in rate statistics.

svn path=/trunk/vorbis-tools/; revision=3543
parent c6dfb13b
......@@ -59,7 +59,10 @@ double timer_time(void *timer)
time_t now = time(NULL);
time_t start = *((time_t *)timer);
return (double)(now-start);
if(now-start)
return (double)(now-start);
else
return 1; /* To avoid division by zero later, for very short inputs */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment