source: vis_dev/glu-2.3/src/util/prtime.c @ 13

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

library glu 2.3

File size: 480 bytes
Line 
1/*
2 * Revision Control Information
3 *
4 * $Id: prtime.c,v 1.4 2009/04/11 02:04:46 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.