Calculate elapsed time (or countdown to future time)

Mary,

This is great! I have been reading lots of posts and bookmarking and saving posts. This is a great start to my problem, and I hope you can help.

My ultimate goal is to create a UUID, Universally unique identifier - Wikipedia. I am trying to use the standard to create a version 1 UUID using the date-time and MAC address. I got the MAC address from the “MAC Address from PAC Controller” post, MAC Address of PAC Controller. With this post, I believe I can get very close with the date.

My issue is, how do I calculate, and I quote from the specs:

“…a 60-bit timestamp, being the number of 100-nanosecond intervals since midnight 15 October 1582 Coordinated Universal Time (UTC), the date on which the Gregorian calendar was first adopted.”

This code provides the elapsed years, days, and HH:MM:SS, from a given date. How would you calculate the needed 100-nanosecond intervals from 1582???

Thank you.

Dwayne (new-to-opto22) Sawyer

PS
Loved the training class and meeting you this past Oct. Tell Norma I said hello! :slight_smile: