Documentation
IPS_GetReplicationSyncTime
int IPS_GetReplicationSyncTime ()
Returns
Unix timestamp of the last successful synchronization. If no synchronization has taken place yet, 0 is returned.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the point in time at which the slave was last successfully synchronized with the master (see replication). This includes loading the configuration on startup. During operation, the synchronization takes place every 5 seconds, so a considerably older point in time indicates problems with the connection to the master.
If the replication is not active, 0 is returned.
Example
$syncTime = IPS_GetReplicationSyncTime();
if ($syncTime > 0) {
echo "Last synchronization " . (time() - $syncTime) . " seconds ago";
}
/* e.g. returns:
Last synchronization 3 seconds ago
*/