Next: HDL generation procedures, Previous: Dumping procedures, Up: Procedures and variables
THUD keeps an event log that you can also use. It is cleared whenever
reset-internals is called.
Add tag and data info to the event log. If tag is the symbol
done, and DATA iseq?to the most recent entry's tag, the time difference in seconds is computed and logged. If over 60 seconds, minutes are also shown. If under 1 second, the output is in microseconds. (Note: Some operating systems may not support microsecond resolution, or may support it poorly.)For example, here is some Scheme code from a hypothetical script that uses the event log to record and time a "characterization" operation:
(log-event 'characterizing '(a b c)) ... do stuff ... (log-event 'done 'characterizing) (display-event-log) => 19981018 Sun 16:07:24 -- internals reset 19981018 Sun 16:07:37 -- characterizing (a b c) 19981018 Sun 16:07:46 -- 8.971523 secIn this case, the operation took almost nine seconds to complete.