From 13af2d1efcc83d1412a4c727afddd97577b00f32 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 4 Dec 2007 17:36:21 -0500 Subject: [PATCH] Restore xf86getsecs() as not having an ANSI equivalent. --- hw/xfree86/common/xf86.h | 1 + hw/xfree86/common/xf86Helper.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 064107428..64449482f 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -339,6 +339,7 @@ Bool xf86IsUnblank(int mode); void xf86AddModuleInfo(ModuleInfoPtr info, pointer module); void xf86DeleteModuleInfo(int idx); +void xf86getsecs(long *, long *); /* xf86Debug.c */ #ifdef BUILDDEBUG diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index d37875c35..ec524e63c 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -2957,3 +2957,17 @@ xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, { return GetMotionHistory(pDev, buff, start, stop, pScreen); } + +_X_EXPORT void +xf86getsecs(long * secs, long * usecs) +{ + struct timeval tv; + + X_GETTIMEOFDAY(&tv); + if (secs) + *secs = tv.tv_sec; + if (usecs) + *usecs= tv.tv_usec; + + return; +}