Instance Method

addHeartbeatWithTimeIntervalSinceSeriesStartDate:precededByGap:completion:

Adds a heartbeat to the series.

Declaration

- (void)addHeartbeatWithTimeIntervalSinceSeriesStartDate:(NSTimeInterval)timeInterval precededByGap:(BOOL)precededByGap completion:(void (^)(BOOL success, NSError *error))completion;

Parameters

timeInterval

The time of the heartbeat, measured from the series builder’s start date. This must be a positive value.

precededByGap

A Boolean value that indicates whether this heartbeat was immediately preceded by a gap in the data, indicating that one or more heartbeats may be missing.

completion

The completion handler called by the builder after it attempts to add the heartbeat to the series. The completion handler takes the following parameters:

success

A Boolean value that indicates whether the builder successfully added the heartbeat.

error

If the success parameter is falseExpression, this contains an object that describes the error; otherwise, nil.

See Also

Adding Data

- addMetadata:completion:

Adds metadata to the sample.