Trevor Stone
01/22/2024, 4:47 PMwithFrameMillis it states: “Time values provided are monotonically increasing; after a call to withFrameMillis completes it must not provide a smaller value for a subsequent call”. I am using compose in a non-android and non-UI context in this case. If I provide a custom clock and don’t follow this guideline (frame 100 might come before frame 3) am I going to run into issues? Is the rule about monotonically increasing frame times enforced in the core compose runtime somehow?jw
01/22/2024, 4:58 PMjw
01/22/2024, 4:59 PMRobert Jaros
01/22/2024, 5:01 PMjw
01/22/2024, 5:02 PMjw
01/22/2024, 5:03 PMRobert Jaros
01/22/2024, 5:09 PMjw
01/22/2024, 5:10 PMRobert Jaros
01/22/2024, 5:11 PMjw
01/22/2024, 5:11 PMRobert Jaros
01/22/2024, 5:14 PMjw
01/22/2024, 5:15 PMRobert Jaros
01/22/2024, 5:16 PMDoris Liu
01/22/2024, 6:49 PMIf I provide a custom clock and don’t follow this guideline (frame 100 might come before frame 3) am I going to run into issues?You might run into issues if you have animations consuming the timestamps produced by the clock. Animations calculates the playtime as
currentFrameTime - startTime, where startTime is frame time of the first animation tick. If the frame time is decreasing, we could end up with negative playTime, which could lead to undefined behavior in animation.Trevor Stone
01/22/2024, 10:21 PM