Server nodeMetadata = provision(cloud);
SlaveOptions opts = getEffectiveSlaveOptions();
try {
JCloudsSlave node = new JCloudsSlave(id, nodeMetadata, labelString, opts);
int timeout = node.getSlaveOptions().getStartTimeout();
<BUG>long startMoment = System.currentTimeMillis();</BUG>
String timeoutMessage = String.format("Failed to connect to slave %s within timeout (%d ms).", node.getNodeName(), timeout);
while (!cloud.isSlaveReadyToLaunch(node)) {
<BUG>if ((System.currentTimeMillis() - startMoment) > timeout) {
</BUG>
LOGGER.warning(timeoutMessage);

Server nodeMetadata = provision(cloud);
SlaveOptions opts = getEffectiveSlaveOptions();
try {
JCloudsSlave node = new JCloudsSlave(id, nodeMetadata, labelString, opts);
int timeout = node.getSlaveOptions().getStartTimeout();
String timeoutMessage = String.format("Failed to connect to slave %s within timeout (%d ms).", node.getNodeName(), timeout);
while (!cloud.isSlaveReadyToLaunch(node)) {
if ((System.currentTimeMillis() - node.getCreatedTime()) > timeout) {
LOGGER.warning(timeoutMessage);
