The example above, as you surely guessed, returns the values 0, and
3000, which represent the nano-seconds, and seconds in the
difference of the input times, respectively. However, note that the
return value of time-difference is an instance of the time type.
Important note: It is an error if the times passed as arguments to
time-difference are of different time types.
Furthermore, if you use care with the time duration types in your
program, you can safely add or subtract to a given time directly (instead of adding seconds). In this case, you can use any kind of time as input.
(require (lib"19.ss""srfi"))
(let ((now (current-time))
(duration (make-time'time-duration0 (*246060))))
(values
(add-durationnowduration) ;; 24 hours from now
(subtract-durationnowduration))) ;; 24 hours in the past