Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. okhttp/src/main/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()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        object : Runnable {
          override fun run() {
            while (true) {
              val task =
                ******@****.***ck {
                  awaitTaskToRun()
                } ?: return
    
              logger.logElapsed(task, task.queue!!) {
                var completedNormally = false
                try {
                  runTask(task)
                  completedNormally = true
                } finally {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top