Skip to content

Conversation

@jackmath5261-bit
Copy link
Contributor

No description provided.

@jetjinser jetjinser self-requested a review February 11, 2026 00:34
Copy link
Collaborator

@jetjinser jetjinser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要写一下 devel/210_13.md

(unless (eq? (time-type time1) (time-type time2))
(error 'wrong-type-arg "time-difference: time types must match"
(list (time-type time1) (time-type time2))))
(set-time-type! time3 TIME-DURATION)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不需要再 set-time-type! 了,传进来的就是

Comment on lines 174 to 183
(if (and (= (time-second time1) (time-second time2))
(= (time-nanosecond time1) (time-nanosecond time2)))
(begin
(set-time-second! time3 0)
(set-time-nanosecond! time3 0))
(receive (nanos secs)
(priv:nanoseconds->values (- (priv:time->nanoseconds time1)
(priv:time->nanoseconds time2)))
(set-time-second! time3 secs)
(set-time-nanosecond! time3 nanos)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 不需要判相等设置0,直接计算就行
  2. 不要写 priv:nanoseconds->values 这个小函数,命名不清楚,而这里直接写 floor/ 内联进来就行。

Copy link
Collaborator

@jetjinser jetjinser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackmath5261-bit jackmath5261-bit merged commit 2d36d9c into main Feb 11, 2026
4 checks passed
@jackmath5261-bit jackmath5261-bit deleted the jie/210_13 branch February 11, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants