---
title: "time(withTimescale:rounding:)"
framework: coremedia
role: symbol
role_heading: Instance Method
path: "coremedia/cmtimebase/time(withtimescale:rounding:)"
---

# time(withTimescale:rounding:)

Returns the current time in the timescale you request.

## Declaration

```swift
func time(withTimescale timescale: CMTimeScale, rounding: CMTimeRoundingMethod = .`default`) -> CMTime
```

## See Also

### Getting and Setting Time

- [setTime(_:)](coremedia/cmtimebase/settime(_:).md)
