Temporal sleep feature

Hi temporal team,

Context: we have an activity which will return a scheduled date and rest of workflow or activities shall be waiting for that date and continue.
We are exploring sleep feature.

  1. Is it ok to write as “Workflow.sleep(mockSleepActivity.composeGreeting(“done”) - Workflow.currentTimeMillis());”?

  2. As one post said that “So all these sleeping workflows are going to have a task scheduled to be delivered at that timestamp.” (Understand Workflow.sleep behaviors / internals - #2 by maxim). So internally it will schedule and awake at a particular timestamp in the future, is it, instead of calculating how much time it has passed?

Thank you for help!

  1. Yes it is OK.

  2. Yes, internally it adds the sleep interval to the current time to calculate the wake up time.