source: vis_dev/cusp-1.1/src/util/prtime.c @ 100

Last change on this file since 100 was 12, checked in by cecile, 13 years ago

cusp added

File size: 485 bytes
RevLine 
[12]1/*
2 * Revision Control Information
3 *
4 * $Id: prtime.c,v 1.1.1.1 2008-11-14 20:40:10 hhkim 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
20char *
21util_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.