---
title: new()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/urlsessiontaskmetrics/new()
---

# new()

Creates a task metrics instance.

## Declaration

```swift
class func new() -> Self
```

## Discussion

Discussion You should never need to create your own URLSessionTaskMetrics instances.
