Relative Content

Tag Archive for javatimeduration

Comparing if a Instant has passed a Duration in java

I am currently trying to fix an issue with my Java Code. Essentially, I have to variables: currentTime of Type Instant and activeAfterSecond of type Duration (from the java.time package).
Basically what I want to do is check whether currentTime has already passed the duration (or reached it). So in pseudocode something like this: