Correlation between timestamps
It seems that you are trying to compute a linear statistical correlation (pearson) for something that is, by nature, a timeseries data. This will not tell you much and drawing a conclusion based on the results is dangerous.
It so happens that your two vectors x and y are growing linearly in the same direction which is not surprising given that they are timestamps.
Let's take an example for stationary data and time series data:
Time series data:
Your sensor starts giving measurements at time t1 and continues to do so until time t2 is reached. You compute the periodic event's timestamp using your own method then compare it to the actual timestamp. However, there is no reliable way using linear statistical correlations to see if the two are related and how related are they.
Stationary data :
Now consider the same sensor giving measurements, but now instead of computing your periodic events all at once, take a single event and compute it multiple times using your empirical data using different measurements (so forget about any notion of time at this point (i.e. repeat the measurement multiple times). The result can be averaged and an error on the mean can be computed (see info on standard error). This, now, can be compared to your single event. Based on the error, you can get a more or less feel of how good or bad your method is.
I would recommend the following :

You have your ground truth answer (say, the periodic event) y_truth. You compute a vector of the periodic events based on your sensor and your own method mapped as a function  f(sensor_input) = y_measured

Now you have two vectors, one measured and one that is ground truth. In each of those vectors, you have an indicator of a the periodic events such as an  id. I would repeat the whole set of measurements, on all  id's tens of times.

For each 'id' I would compute whatever measurement you are looking for (either a timestamp or time in seconds or whatever...) then I would subtract the two timestamps :  |y_truth - y_measured|. This is called residuals or in other words, your error.

Now averging all the residuals of all the id's gives you something called mean absolute error (1/n * sum (|y_truth - y_measured|) which you can very confidently use to report how much error, in a unit of time (seconds for example), your method produces.
I hope this isn’t off topic, I am not really sure which forum to use for a question like this:
I have a series of datapoints of about an hour in time from a sensor that retrieves data 20 times per second. Along with it I receive timestamps of a periodic event in this data in the format of %Y-%m-d %H:%M:%S.%f, which looks e.g. like this 2019-05-23 17:50:34.346000.
I now created a method to calculate these periodic events myself and was wondering how I could evalute my methods accuracy. My calculations are sometimes bigger and sometimes smaller by a few milliseconds compared to the actual timestamp. But when I run my own calculated timestamp against the actual timestamp by using pythons scipy.stats.pearsonr(x,y) method, I always receive a correlation of nearly 1. I assume that‘s because these small differences in the order of millisenconds don‘t seem relevant in an hour of data. But how could I evaluate the accuracy of two timestamps a reasonable way? Are there better metrics to use than the correlation?