在 Apex 中实现线程等待逻辑
Long waitMilliseconds = 4 * 1000;
Long startTime = DateTime.now().getTime();
Long finishTime = DateTime.now().getTime();
while ((finishTime - startTime) < waitMilliseconds) {
finishTime = DateTime.now().getTime();
}
Long waitMilliseconds = 4 * 1000;
Long startTime = DateTime.now().getTime();
Long finishTime = DateTime.now().getTime();
while ((finishTime - startTime) < waitMilliseconds) {
finishTime = DateTime.now().getTime();
}