use of com.safframework.study.task.core.impl.MockTask in project RxJavaInAction by fengzhizi715.
the class TasksController method sequential.
@GetMapping("/sequential")
public ApiResponseDTO sequential(@RequestParam("task") int[] taskDelaysInSeconds) {
StopWatch watch = new StopWatch();
watch.start();
IntStream.of(taskDelaysInSeconds).mapToObj(MockTask::new).forEach(MockTask::execute);
watch.stop();
return new ApiResponseDTO(watch.getTotalTimeSeconds());
}
Aggregations