source: vis_dev/glu-2.1/src/util/prtime.c @ 8

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

src glu

File size: 481 bytes
RevLine 
[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
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.