Attention is currently required from: Julius Werner, Angel Pons, Subrata Banik, Aaron Durbin. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51445 )
Change subject: timestamp: Add helper fucntions ......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/51445/comment/f58c7349_1ae27c62 PS3, Line 7: Add helper fucntions
... and for this you need some way to add relative ones.
Do you think `timestamp_add_relative()` is clearer than `timestamp_add_time_from_base()`? Shorter names are easier to read too, but I was afraid if it seemed too ambiguous.
BTW, am I seeing this right that in this particular case, your rewind_base() would cause ts->base_time to underflow and become a large positive uint64_t?
Your observation is absolutely right. I had noticed this when reading the picasso/ code(it already underflows base_time), but like you said, it should still work out and we never really should see values wrapping around, so it isn't a problem. But I agree with you that it looks a little weird and changing to int64_t might be better. We can fix that as part of this effort.