How to get unformatted time

How do I get unformatted time (milliseconds since the Epoch) from Date() or some other function call?

I need to do this in a function, injecting a timestamp won't work for this.

Thanks!

Thanks! Works great!

This is pure js topic, for future reference: Date - JavaScript | MDN