Don’t do this. You don’t need to. You’ll end up with the opposite problem in about 17 years. Just take the difference of the two numbers, it will be fine.
How are you converting to minutes? The timestamp values are not in units of minutes, the most significant 32 bits are seconds, and the least significant bits are fractions of a second.
If you want to get the difference in minutes then divide the difference of the two timestamps by 2^32 * 60 - Calculate out this constant (literal) and put an i64 suffix on it, don’t use the Power function as it doesn’t support 64 bit integers.
Don’t clear bit 64 or multiply by -1, this will cause you grief in about 17 years.
I also said not to use Power with 64 bit numbers, but the documentation on this is wrong (@GrayChurch.Opto22) - in testing it seems to support returning a 64 bit integer, so that is okay. I would change it to a constant anyways and don’t forget the i64 suffix on any constants you are using with 64 bit numbers.
Slight modifications below. Should work until around 2104ish and could work beyond that if you care to test for it (overflow from 7FFFFFFFFFFFFFFF to 8000000000000000).
// Get NTP Timestamp and store to [0]
nsChart = GetDateTime(nt_DateTime);
nsChart = DateTimeToNtpTimestamp(nt_DateTime, n64_temp);
nt64_NtpReference[0] = n64_temp;
DelaySec(310);
// Get NTP Timestamp and store to [1]
nsChart = GetDateTime(nt_DateTime);
nsChart = DateTimeToNtpTimestamp(nt_DateTime, n64_temp);
nt64_NtpReference[1] = n64_temp;
// subtract NTP Timestamp
n64_DiffInMin = nt64_NtpReference[1] - nt64_NtpReference[0];
//convert to min
n64_DiffInMin = n64_DiffInMin / 257,698,037,760i64;
DelayMsec(10000);