# PrefetchRequestScope

# PrefetchRequestScope

Artifact:[androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/lazy/layout/PrefetchScheduler.kt+class:androidx.compose.foundation.lazy.layout.PrefetchRequestScope)  
Added in[1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.7.0)  
Deprecated in[1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0)
Common/AllAndroid/JVM
  - Cmn  

  ```
  @ExperimentalFoundationApi
  interface PrefetchRequestScope
  ```

*** ** * ** ***

| **This interface is deprecated.**   
| Customization of PrefetchScheduler is no longer supported. LazyLayout will attach an appropriate scheduler internally. If you needed to customize it please file a Feature Request.

Scope for[PrefetchRequest.execute](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/PrefetchRequest#(androidx.compose.foundation.lazy.layout.PrefetchRequestScope).execute()), supplying info about how much time it has to execute requests and the type of execution mode.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [availableTimeNanos](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/PrefetchRequestScope#availableTimeNanos())`()` How much time is available to do prefetch work. | Cmn |

## Public functions

### availableTimeNanos

Cmn  
Added in[1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.7.0)  
Deprecated in[1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0)  

```
fun availableTimeNanos(): Long
```

How much time is available to do prefetch work. Implementations of[PrefetchRequest](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/layout/PrefetchRequest)should do their best to fit their work into this time without going over.