Interface Task

  • All Known Subinterfaces:
    BlockingTask
    All Known Implementing Classes:
    BackgroundTask, ForegroundTask

    public interface Task
    A task defines a piece of code that may be executed - in the foreground or background - within a certain budget that is specific to the task type.
    • Method Detail

      • elapsed

        Duration elapsed()
        How long it took to run the task
        Returns:
        The duration to execute the task