WordPress at a glance
function is not described

heartbeat_autosave() WP 3.9.0

Autosave with heartbeat

No Hooks.

Return

Array. The Heartbeat response.

Usage

heartbeat_autosave( $response, $data );
$response(array) (required)
The Heartbeat response.
$data(array) (required)
The $_POST data sent.

Code of heartbeat autosave: wp-admin/includes/misc.php WP 5.2.1

<?php
function heartbeat_autosave( $response, $data ) {
	if ( ! empty( $data['wp_autosave'] ) ) {
		$saved = wp_autosave( $data['wp_autosave'] );

		if ( is_wp_error( $saved ) ) {
			$response['wp_autosave'] = array(
				'success' => false,
				'message' => $saved->get_error_message(),
			);
		} elseif ( empty( $saved ) ) {
			$response['wp_autosave'] = array(
				'success' => false,
				'message' => __( 'Error while saving.' ),
			);
		} else {
			/* translators: draft saved date format, see https://secure.php.net/date */
			$draft_saved_date_format = __( 'g:i:s a' );
			/* translators: %s: date and time */
			$response['wp_autosave'] = array(
				'success' => true,
				'message' => sprintf( __( 'Draft saved at %s.' ), date_i18n( $draft_saved_date_format ) ),
			);
		}
	}

	return $response;
}