--- a/AbstractOperatingSystem.st Fri Mar 16 10:47:57 2018 +0100
+++ b/AbstractOperatingSystem.st Fri Mar 16 10:50:14 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -1137,7 +1139,6 @@
"Created: / 12.11.1998 / 14:39:20 / cg"
! !
-
!AbstractOperatingSystem class methodsFor:'executing OS commands-public'!
executeCommand:aCommandString
@@ -6865,6 +6866,30 @@
self subclassResponsibility
!
+getOSTimeInMicros
+ "This returns the OS time as a 3-element vector in microsecond resolution.
+ The base of the returned value is not consistent across
+ different OS's - some return the number of microseconds since jan, 1st 1970;
+ others since 1900. The Time classes are prepared for this, and
+ converts as appropriate (by using my fromOSTime: conversion methods).
+
+ Don't use this method in application code since it is an internal (private)
+ interface. For compatibility with ST-80, use Time>>millisecondClockValue.
+ or use instances of Time, Date or Timestamp to work with."
+
+ "here, a fallback, which only provides millisecond resolution"
+
+ |osTime|
+
+ osTime := self getOSTime.
+ ^ { osTime // 1000 . osTime \\ 1000 . 0 }
+
+ "
+ OperatingSystem getOSTime
+ OperatingSystem getOSTimeInMicros
+ "
+!
+
getRealNanosecondTime
"This returns the microsecond timers value - if available.
On some machines, times with this precision may not be available,