00001 /* 00002 * Revision Control Information 00003 * 00004 * $Id: prtime.c,v 1.4 2009/04/11 02:04:46 fabio Exp $ 00005 * 00006 */ 00007 /* LINTLIBRARY */ 00008 00009 #include <stdio.h> 00010 #include "util.h" 00011 00012 00013 /* 00014 * util_print_time -- massage a long which represents a time interval in 00015 * milliseconds, into a string suitable for output 00016 * 00017 * Hack for IBM/PC -- avoids using floating point 00018 */ 00019 00020 char * 00021 util_print_time(long t) 00022 { 00023 static char s[40]; 00024 00025 (void) sprintf(s, "%ld.%02ld sec", t/1000, (t%1000)/10); 00026 return s; 00027 }