drv/virtual/clock: Expose microseconds.
All drivers use microseconds, so it is useful to have this available for reading.
Another option would be to drop nanoseconds since it isn't
used anywhere except for unix port compatibility.
@@ -38,6 +38,13 @@ class VirtualClock:
self._thread_id = thread_id
self._signum = signum
+ @property
+ def microseconds(self) -> int:
+ """
+ The current clock time in microseconds.
+ """
+ return self.nanoseconds // 1000
+
class WallClock(VirtualClock):
"""
