projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.5.0
[debian/amanda]
/
common-src
/
clock.c
diff --git
a/common-src/clock.c
b/common-src/clock.c
index 840992f86378f45c85cf06960eee3667e799c718..732b4ef01b578b3b57c1a4e0ca16b53ad572851d 100644
(file)
--- a/
common-src/clock.c
+++ b/
common-src/clock.c
@@
-25,7
+25,7
@@
* University of Maryland at College Park
*/
/*
* University of Maryland at College Park
*/
/*
- * $Id: clock.c,v 1.
2.2.2 2002/03/31 21:01:33
jrjackson Exp $
+ * $Id: clock.c,v 1.
5 2002/04/08 00:16:18
jrjackson Exp $
*
* timing functions
*/
*
* timing functions
*/
@@
-41,12
+41,6
@@
times_t times_zero = {{0,0}};
times_t start_time;
static int clock_running = 0;
times_t start_time;
static int clock_running = 0;
-#ifdef HAVE_TWO_ARG_GETTIMEOFDAY
-# define amanda_gettimeofday(x, y) gettimeofday((x), (y))
-#else
-# define amanda_gettimeofday(x, y) gettimeofday((x))
-#endif
-
int clock_is_running()
{
return clock_running;
int clock_is_running()
{
return clock_running;
@@
-54,9
+48,7
@@
int clock_is_running()
void startclock()
{
void startclock()
{
-#ifdef HAVE_TWO_ARG_GETTIMEOFDAY
- struct timezone dontcare;
-#endif
+ amanda_timezone dontcare;
clock_running = 1;
amanda_gettimeofday(&start_time.r, &dontcare);
clock_running = 1;
amanda_gettimeofday(&start_time.r, &dontcare);
@@
-66,10
+58,7
@@
times_t stopclock()
{
times_t diff;
struct timeval end_time;
{
times_t diff;
struct timeval end_time;
-
-#ifdef HAVE_TWO_ARG_GETTIMEOFDAY
- struct timezone dontcare;
-#endif
+ amanda_timezone dontcare;
if(!clock_running) {
fprintf(stderr,"stopclock botch\n");
if(!clock_running) {
fprintf(stderr,"stopclock botch\n");
@@
-85,10
+74,7
@@
times_t curclock()
{
times_t diff;
struct timeval end_time;
{
times_t diff;
struct timeval end_time;
-
-#ifdef HAVE_TWO_ARG_GETTIMEOFDAY
- struct timezone dontcare;
-#endif
+ amanda_timezone dontcare;
if(!clock_running) {
fprintf(stderr,"curclock botch\n");
if(!clock_running) {
fprintf(stderr,"curclock botch\n");
@@
-125,7
+111,7
@@
times_t t;
char *s;
/* tv_sec/tv_usec are longs on some systems */
char *s;
/* tv_sec/tv_usec are longs on some systems */
-
ap_
snprintf(str[n], sizeof(str[n]),
+ snprintf(str[n], sizeof(str[n]),
"rtime %d.%03d", (int)t.r.tv_sec, (int)t.r.tv_usec/1000);
s = str[n++];
n %= am_countof(str);
"rtime %d.%03d", (int)t.r.tv_sec, (int)t.r.tv_usec/1000);
s = str[n++];
n %= am_countof(str);
@@
-140,7
+126,7
@@
times_t t;
char *s;
/* tv_sec/tv_usec are longs on some systems */
char *s;
/* tv_sec/tv_usec are longs on some systems */
-
ap_
snprintf(str[n], sizeof(str[n]),
+ snprintf(str[n], sizeof(str[n]),
"%d.%03d", (int)t.r.tv_sec, (int)t.r.tv_usec/1000);
s = str[n++];
n %= am_countof(str);
"%d.%03d", (int)t.r.tv_sec, (int)t.r.tv_usec/1000);
s = str[n++];
n %= am_countof(str);