Revision: 41973
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41973&view=rev
Author:   erikgreenwald
Date:     2011-01-06 16:15:43 +0000 (Thu, 06 Jan 2011)

Log Message:
-----------
winderz fixes

Modified Paths:
--------------
    brlcad/trunk/src/libbu/timer.c

Modified: brlcad/trunk/src/libbu/timer.c
===================================================================
--- brlcad/trunk/src/libbu/timer.c      2011-01-06 15:40:30 UTC (rev 41972)
+++ brlcad/trunk/src/libbu/timer.c      2011-01-06 16:15:43 UTC (rev 41973)
@@ -49,21 +49,20 @@
            + (int64_t)nowTime.tv_usec);
 #else /* !defined(_WIN32) */
     LARGE_INTEGER count;
-    static LARGE_INTEGER freq = 0;
-    int rval;
+       static LARGE_INTEGER freq = {0};
 
-    if(freq == 0)
+    if(freq.QuadPart == 0)
        if(QueryPerformanceFrequency(&freq) == 0) {
            bu_log("QueryPerformanceFrequency failed\n");
            return -1;
        }
 
-    if(QueryPerformanceCounter(&freq) == 0) {
+    if(QueryPerformanceCounter(&count) == 0) {
        bu_log("QueryPerformanceCounter failed\n");
        return -1;
     }
 
-    return 1e6*count/freq;
+    return 1e6*count.QuadPart/freq.QuadPart;
 
 #endif /* !defined(_WIN32) */
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to