I am trying out sleep 2.0, and I saw in the documentation that duration can now be defined as a chrono literal (neat!), but am just wondering 2 things.
1.) When NOT using chrono literal, does the duration still need to be a
long type like it did with classic sleep, or can/should it be something else?
2.) Less importantly, how would one go about using chrono literals with a variable sleep duration? Could I pass it in like a string? For instance :
System.sleep(sleepMins + "min");
This doesn’t seem like it would work but I hope that conveys what I am asking.