WHen creating a simpy.rt.RealtimeEnvironment object, the self.real_start property is set upon initialization. This results in a huge sim_delta time in the first call to RealtimeEnvironment.step(), which in turn causes the delay value to come back as negative and finally resulting in either a thrown exception (if self.strict == True) or a sped-up environment run until the runtime clock catches up with the realtime clock (if self.strict == False).
I wrote a quick fix for myself (I needed a realtime clock simulator for a project) which sems to work fine. Basically, just set self.real_start in an overridden run() method, letting the realtime clock and runtime clock both start at approximately the same time. Thanks for your work!
def run(self, *args, **kwargs): self.real_start = time() super(RealtimeEnvironment, self).run(*args, **kwargs)