If all you need is time elapsed since epoch, you dont wanna do that. Nor `+new Date()`. They are way more expensive than a plain `Date.now()`.
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now On 05/04/2013 07:02 μμ, Herman Junge wrote: > console.log(new Date()).getTime(); > > On 4/5/13 12:56 PM, Tolgay Toklar wrote: >> Hi >> >> How can I get server timestamp in nodejs ? (Like a php time() >> function) -- -- Job Board: http://jobs.nodejs.org/ Posting >> guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. To post to this group, send email to >> nodejs@googlegroups.com To unsubscribe from this group, send >> email to nodejs+unsubscr...@googlegroups.com For more options, >> visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- You received this message because you are subscribed to the >> Google Groups "nodejs" group. To unsubscribe from this group and >> stop receiving emails from it, send an email to >> nodejs+unsubscr...@googlegroups.com. For more options, visit >> https://groups.google.com/groups/opt_out. >> >> > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.