sim: improve formatting

This commit is contained in:
Sebastien Bourdeauducq 2022-04-12 15:58:54 +08:00
parent 0978cd0e35
commit c171deec51
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class WaveOutput:
@kernel
def pulse(self, frequency, duration):
time.manager.event(("pulse", self.name, frequency, duration))
time.manager.event(("pulse", self.name, frequency, self.core.seconds_to_mu(duration)))
delay(duration)

View File

@ -62,7 +62,7 @@ class Manager:
r = ""
prev_time = 0*s
for time, description in sorted(self.timeline, key=itemgetter(0)):
r += "@{:.9f} (+{:.9f}) ".format(time, time-prev_time)
r += "{:35}".format("@{:.9f} (+{:.9f}) ".format(time, time-prev_time))
for item in description:
r += "{:16}".format(str(item))
r += "\n"