Win32OperatingSystem.st
changeset 19666 755edabcbe67
parent 19653 ad5ce2d82380
child 19667 16bfe221f88e
child 19668 8c30d204cd7b
--- a/Win32OperatingSystem.st	Wed Apr 27 18:56:09 2016 +0200
+++ b/Win32OperatingSystem.st	Wed Apr 27 20:05:13 2016 +0200
@@ -690,11 +690,11 @@
     lTime -= 11644473600000LL;  // the number of millis from 1.1.1601 to 1.1.1970
     return(__MKINT(lTime));
 #else
-    if (lTime >= 11644473600000LL) {
-	lTime -= 11644473600000LL;  // the number of millis from 1.1.1601 to 1.1.1970
+    if (lTime >= (LONGLONG)11644473600000L) {
+	lTime -= (LONGLONG)11644473600000L;  // the number of millis from 1.1.1601 to 1.1.1970
 	return(__MKLARGEINT64(1, (unsigned INT)(lTime & 0xFFFFFFFF), (unsigned INT)(lTime >> 32)));
     } else {
-	lTime = 11644473600000LL - lTime;
+	lTime = (LONGLONG)11644473600000L - lTime;
 	return(__MKLARGEINT64(-1, (unsigned INT)(lTime & 0xFFFFFFFF), (unsigned INT)(lTime >> 32)));
     }
 #endif
@@ -941,6 +941,7 @@
     "Modified: 7.1.1997 / 19:36:11 / stefan"
 ! !
 
+
 !Win32OperatingSystem class methodsFor:'OS signal constants'!
 
 sigABRT
@@ -10679,19 +10680,25 @@
 
 epochEndOSTime
     "private interface for timestamp to ask the OS what the maximum time
-     (in milliseconds since the Unix epoch, 1.1.1970) is.
-     Windows has a 64 Unix 100ns osTime internally, which goes from 0 (1601)
+     (in milliseconds since the Unix epoch, 1.1.1970) is."
+
+    "Windows has a 64 Unix 100ns osTime internally, which goes from 0 (1601)
      to 16r7FFFFFFFFFFFFFFF."
-
-    ^ (16r7FFFFFFFFFFFFFFF // 10000) - self osTimeOf19700101
+    "/ ^ (16r7FFFFFFFFFFFFFFF // 10000) - self osTimeOf19700101
+
+    "/ but I changed the interface to use unix-biased times as well
+    ^ (SmallInteger maxVal * 2 + 1) * 1000
 !
 
 epochStartOSTime
     "private interface for timestamp to ask the OS what the minimum time
-     (in milliseconds since the Unix epoch, 1.1.1970) is.
-     Windows epoch starts at 1.1.1601."
-
-    ^ self osTimeOf19700101 negated
+     (in milliseconds since the Unix epoch, 1.1.1970) is."
+
+    "Windows epoch starts at 1.1.1601."
+    "/ ^ self osTimeOf19700101 negated
+
+    "/ but I changed the interface to use unix-biased times as well
+    ^ 0
 !
 
 getMicrosecondTime