Browse Source

Casting out a warning on osx

Roger Hughston 18 years ago
parent
commit
07882dcd7d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      panda/src/nativenet/time_span.h

+ 2 - 2
panda/src/nativenet/time_span.h

@@ -90,8 +90,8 @@ inline Time_Span::Time_Span(time_t time)
 //////////////////////////////////////////////////////////////
 inline Time_Span::Time_Span(float Seconds)
 {
-    _my_time.tv_sec = Seconds; // this truncats .. desired result..
-    _my_time.tv_usec = (Seconds - (double)_my_time.tv_sec) * (double)USEC;
+    _my_time.tv_sec = (long)Seconds; // this truncats .. desired result..
+    _my_time.tv_usec = (long)((Seconds - (double)_my_time.tv_sec) * (double)USEC);
 }
 //////////////////////////////////////////////////////////////
 // Function name : Time_Span::Time_Span