--- a/UnixOperatingSystem.st Wed May 09 16:30:32 2018 +0200
+++ b/UnixOperatingSystem.st Wed May 09 17:27:24 2018 +0200
@@ -10218,34 +10218,36 @@
unsigned long _secs, _millis, _nanos;
if (has_clock_gettime) {
- if (clock_gettime(CLOCK_REALTIME, &ts) != -1) {
- _secs = ts.tv_sec;
- _millis = ts.tv_nsec / 1000000;
- _nanos = ts.tv_nsec % 1000000;
-
- seconds = __MKUINT(_secs);
- millis = __MKUINT(_millis);
- nanos = __MKUINT(_nanos);
- } else {
- /*
- * clock_gettime is not implemented in the kernel
- * fall through to alternative implementation
- */
- has_clock_gettime = 0;
- }
+ if (clock_gettime(CLOCK_REALTIME, &ts) != -1) {
+ _secs = ts.tv_sec;
+ _millis = ts.tv_nsec / 1000000;
+ _nanos = ts.tv_nsec % 1000000;
+
+ seconds = __MKUINT(_secs);
+ millis = __MKUINT(_millis);
+ nanos = __MKUINT(_nanos);
+ } else {
+ /*
+ * clock_gettime is not implemented in the kernel
+ * fall through to alternative implementation
+ */
+ has_clock_gettime = 0;
+ }
}
# endif
%}.
seconds notNil ifTrue:[
- ^ { ((seconds * 1000) + millis) . nanos }
- ].
- ^ super getOSTimeInNanos
-
- "
- OperatingSystem getOSTimeInNanos printCR.
+ ^ { ((seconds * 1000) + millis) . nanos }
+ ].
+ ^ super getOSTimeWithNanos
+
+ "
+ OperatingSystem getOSTimeWithNanos printCR.
Delay waitForSeconds:0.1.
- OperatingSystem getOSTimeInNanos printCR.
- "
+ OperatingSystem getOSTimeWithNanos printCR.
+ "
+
+ "Modified: / 09-05-2018 / 17:25:31 / stefan"
!
getRealNanosecondTime