[m-dev.] diff: Apply C coding convention to mercury_timing.c

Peter Ross petdr at cs.mu.OZ.AU
Tue Jul 4 22:37:55 AEST 2000


Hi,


===================================================================


Estimated hours taken: 0.1

mercury_timing.c:
    Use the Mercury C coding convention.


Index: mercury_timing.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_timing.c,v
retrieving revision 1.4
diff -u -r1.4 mercury_timing.c
--- mercury_timing.c	2000/07/04 12:23:29	1.4
+++ mercury_timing.c	2000/07/04 12:36:30
@@ -28,27 +28,27 @@
 {
 #ifndef MR_CLOCK_TICKS_PER_SECOND
   #ifdef MR_WIN32_GETPROCESSTIMES
-    #define FILETIME_TO_MILLISEC(ST, Msec)				\
+    #define FILETIME_TO_MILLISEC(time, msec)				\
 	do								\
 	{								\
 	  SYSTEMTIME tmp;						\
-	  FileTimeToSystemTime(&ST, &tmp);				\
-	  Msec = tmp.wMilliseconds +					\
+	  FileTimeToSystemTime(&time, &tmp);				\
+	  msec = tmp.wMilliseconds +					\
 	    1000 * (tmp.wSecond + 60 * (tmp.wMinute + 60 * tmp.wHour));	\
 	} while(0)
 
-	FILETIME CreationTime;
-	FILETIME ExitTime;
-	FILETIME KernelTime;
-	FILETIME UserTime;
-	int UserMsec, KernelMsec;
+	FILETIME creation_time;
+	FILETIME exit_time;
+	FILETIME kernel_time;
+	FILETIME user_time;
+	int user_msec, kernel_msec;
 	
 	GetProcessTimes(GetCurrentProcess(),
-					&CreationTime, &ExitTime,
-					&KernelTime, &UserTime);
-	FILETIME_TO_MILLISEC(UserTime, UserMsec);
-	FILETIME_TO_MILLISEC(KernelTime, KernelMsec);
-	return UserMsec + KernelMsec;
+					&creation_time, &exit_time,
+					&kernel_time, &user_time);
+	FILETIME_TO_MILLISEC(user_time, user_msec);
+	FILETIME_TO_MILLISEC(kernel_time, kernel_msec);
+	return user_msec + kernel_msec;
   #else
 	return -1;
   #endif

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list