Transcript from the "Unix Time" Lesson
>> Brian Holt: date.now this is going to be a very, very, very useful function for you that you're going to have to get used to. date.now, if I call like that, gives me how many milliseconds it's been since January 1, 1970. For real, that's actually what it does. Why January 1st, 1970?
This is giving me whatever time my computer thinks it is, right? So that means, if I wanna say then equals date.now
>> Brian Holt: And then we'll wait like five more seconds and then I'm going to say, okay, how many seconds has it been since then? I'm gonna say date.now minus then.
[00:01:12] Right? And I'm going to see that it's been roughly about 12 seconds since I started tracking them, right? So this is how you're going to track how much time has transpired since last time you called the function. You're gonna use date.then and then you're going to minus whatever date.now was back then.