nodejs get previous time in milliseconds

So, I know you can do something like this:

prev.mtime

In side of the fs.watchFile function, but that will return the date formated with something like this:

Fri Aug 02 2013 17:40:28 GMT-0400 (EDT)

But I would like to get the previous timestamp line in milliseconds.

prev.mtime is a JavaScript Date object. What you're seeing is the default string representation of the object. You can use its getTime() method to get the timestamp in milliseconds.

References:

http://nodejs.org/api/fs.html#fs_class_fs_stats

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

wow, nevermind... I got it:

console.dir(prev.mtime.getTime());
console.dir(curr.mtime.getTime());

That was easy!