Getting unix timestamp in milliseconds in PHP5 and Actionscript3

后端 未结 12 2564
被撕碎了的回忆
被撕碎了的回忆 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

    I used unsigned integer as the return type of the function. This should be Number.

    public static function getTimeStamp():Number
            {
                var now:Date = new Date();
                return now.getTime();
            }
    

    Think I got the function for getting milliseconds in PHP5 now.

    function msTimeStamp() {
        return round(microtime(1) * 1000);
    }
    

提交回复
热议问题