Getting unix timestamp in milliseconds in PHP5 and Actionscript3

后端 未结 12 2568
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 09:58

In Actionscript, the Unix timestamp in milliseconds is obtainable like this:

public static function getTimeStamp():uint
        {
            var now:Date =          


        
12条回答
  •  庸人自扰
    2020-12-16 10:37

    microtime() in php5 returns unix timestamp with microseconds as per microtime() and if the get_as_float argument is not provided, it gives you a string formatted as "msec sec" so the first part is the millisecond part and the second is the second part. Just split it in two and you get the two parts of the timestamp

提交回复
热议问题