---
title: "record(atTime:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiorecorder/record(attime:)"
---

# record(atTime:)

Records audio starting at a specific time.

## Declaration

```swift
func record(atTime time: TimeInterval) -> Bool
```

## Parameters

- `time`: The time at which to start recording, relative to doc://com.apple.avfaudio/documentation/AVFAudio/AVAudioRecorder/deviceCurrentTime.

## Return Value

Return Value true if recording starts successfully; otherwise, false.

## Discussion

Discussion You can call this method on a single recorder, or use it to synchronize the recording of multiple players as shown below. func startSynchronizedRecording() {     // Create a time offset relative to the current device time.     let timeOffset = recorderOne.deviceCurrentTime + 0.01          // Synchronize the recording time of both recorders.     recorderOne.record(atTime: timeOffset)     recorderTwo.record(atTime: timeOffset) } Calling this method implicitly calls prepareToRecord(), which creates an audio file and prepares the system for recording.

## See Also

### Controlling recording

- [prepareToRecord()](avfaudio/avaudiorecorder/preparetorecord().md)
- [record()](avfaudio/avaudiorecorder/record().md)
- [record(forDuration:)](avfaudio/avaudiorecorder/record(forduration:).md)
- [record(atTime:forDuration:)](avfaudio/avaudiorecorder/record(attime:forduration:).md)
- [pause()](avfaudio/avaudiorecorder/pause().md)
- [stop()](avfaudio/avaudiorecorder/stop().md)
- [isRecording](avfaudio/avaudiorecorder/isrecording.md)
- [deleteRecording()](avfaudio/avaudiorecorder/deleterecording().md)
