Rev | Line | |
---|
[8] | 1 | /* |
---|
| 2 | * Revision Control Information |
---|
| 3 | * |
---|
| 4 | * $Id: prtime.c,v 1.3 2002/08/25 02:37:11 fabio Exp $ |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | /* LINTLIBRARY */ |
---|
| 8 | |
---|
| 9 | #include <stdio.h> |
---|
| 10 | #include "util.h" |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | /* |
---|
| 14 | * util_print_time -- massage a long which represents a time interval in |
---|
| 15 | * milliseconds, into a string suitable for output |
---|
| 16 | * |
---|
| 17 | * Hack for IBM/PC -- avoids using floating point |
---|
| 18 | */ |
---|
| 19 | |
---|
| 20 | char * |
---|
| 21 | util_print_time(long t) |
---|
| 22 | { |
---|
| 23 | static char s[40]; |
---|
| 24 | |
---|
| 25 | (void) sprintf(s, "%ld.%02ld sec", t/1000, (t%1000)/10); |
---|
| 26 | return s; |
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.