<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sleep(self, seconds):
 """ Sleep in simulated time. """

        start = self.time()
        while (self.time() - start < seconds and
               not self.need_to_stop.is_set()):
            self.need_to_stop.wait(self.sim_time)