Is there any way to get milliseconds out of a timestamp in MySql or PostgreSql (or others just out of curiosity)?
MySql
PostgreSql
SELECT CURRENT_TI
For MySQL (5.6+) you can do this:
SELECT ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000)
Which will return (e.g.):
1420998416685 --milliseconds