I want to record the timestamp when an iOS peripheral sends data to a central device. Here’s what I did:
let startDate = Date()
if peripheralManager.updateValue(packet, for: characteristic, onSubscribedCentrals: nil) {
let sentTime = Date().timeIntervalSince(startDate)
}
However, the recorded time is nearly 0.1 ms. If I send 244 bytes per update, this suggests a throughput of 2.44 MB/s, which seems too high.
Did I make a mistake, or is updateValue() not actually sending the data at that moment?