Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for logElapsed (0.6 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskLogger.kt

    internal inline fun Logger.taskLog(
      task: Task,
      queue: TaskQueue,
      messageBlock: () -> String,
    ) {
      if (isLoggable(Level.FINE)) {
        log(task, queue, messageBlock())
      }
    }
    
    internal inline fun <T> Logger.logElapsed(
      task: Task,
      queue: TaskQueue,
      block: () -> T,
    ): T {
      var startNs = -1L
      val loggingEnabled = isLoggable(Level.FINE)
      if (loggingEnabled) {
        startNs = queue.taskRunner.backend.nanoTime()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

            val oldName = currentThread.name
            try {
              while (true) {
                currentThread.name = task.name
                val delayNanos =
                  logger.logElapsed(task, task.queue!!) {
                    task.runOnce()
                  }
    
                // A task ran successfully. Update the execution state and take the next task.
                task = withLock {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top