Imported Upstream version 2.5.1
[debian/amanda] / common-src / clock.h
index 8d3922e2dd2694e3f3d916c0409d9febb4776c1a..391b3835a4494e2e7276bd948fd408df3878cfe7 100644 (file)
@@ -25,7 +25,7 @@
  *                        University of Maryland at College Park
  */
 /*
- * $Id: clock.h,v 1.2.2.2 2002/03/31 21:01:33 jrjackson Exp $
+ * $Id: clock.h,v 1.6 2006/05/25 01:47:11 johnfranks Exp $
  *
  * interface for timing functions
  */
@@ -44,13 +44,21 @@ typedef struct times_s {
 
 extern times_t times_zero, start_time;
 
-void startclock P((void));
-times_t stopclock P((void));
-times_t curclock P((void));
-times_t timesadd P((times_t a, times_t b));
-times_t timessub P((times_t a, times_t b));
-char * times_str P((times_t t));
-char * walltime_str P((times_t t));
-int clock_is_running P((void));
+#ifdef HAVE_TWO_ARG_GETTIMEOFDAY
+#  define amanda_timezone struct timezone
+#  define amanda_gettimeofday(x, y) gettimeofday((x), (y))
+#else
+#  define amanda_timezone int
+#  define amanda_gettimeofday(x, y) gettimeofday((x))
+#endif
+
+void startclock(void);
+times_t stopclock(void);
+times_t curclock(void);
+times_t timesadd(times_t a, times_t b);
+times_t timessub(times_t a, times_t b);
+char * times_str(times_t t);
+char * walltime_str(times_t t);
+int clock_is_running(void);
 
 #endif /* CLOCK_H */