You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
389 B

  1. /* LINTLIBRARY */
  2. #include <stdio.h>
  3. #include "util.h"
  4. /*
  5. * util_print_time -- massage a long which represents a time interval in
  6. * milliseconds, into a string suitable for output
  7. *
  8. * Hack for IBM/PC -- avoids using floating point
  9. */
  10. char *
  11. util_print_time(unsigned long t)
  12. {
  13. static char s[40];
  14. (void) sprintf(s, "%lu.%02lu sec", t/1000, (t%1000)/10);
  15. return s;
  16. }