var timeArr = moment().format(\'HH:mm:ss\').split(\':\'); var timeInMilliseconds = (timeArr[0] * 3600000) + (timeArr[1] * 60000);
This solution works,
To get the current time's milliseconds, use http://momentjs.com/docs/#/get-set/millisecond/
var timeInMilliseconds = moment().milliseconds();