I try to be careful about future-proofing the code I write, but I just did a weird thing when choosing the type of clock to use for seeding a random number generator in a throwaway script.
I could have chosen to use nanoseconds or milliseconds since the Unix epoch. If I chose nanoseconds, the timestamp would only be good to use until some time in 2262. Milliseconds give me a timestamp that is useful until the year 292,001,970, give or take a millennia.
I chose to use milliseconds. 🤪
✍️ Reply by email