Add unit tests.

This is probably not a useful test, because new Date().getTime() precision is at milliseconds level. Your next statement will run at the next hundred nano secs.