if( !function_exists('current_timestamp'))
{
    /**
     * [current_timestamp 返出日期时间类型带毫秒]
     * @Author   Jerry
     * @DateTime 2018-10-23T11:34:58+0800
     * @Example  eg:
     * @return   [type]                   [description]
     */
    function current_timestamp(){
      // date_default_timezone_set('PRC');
        $mtimestamp = sprintf("%.3f", microtime(true)); // 带毫秒的时间戳
        $timestamp = floor($mtimestamp); // 时间戳
        $milliseconds = round(($mtimestamp - $timestamp) * 1000); // 毫秒
        return  date("Y-m-d H:i:s", $timestamp) . '.' . $milliseconds;
        // return  sprintf("%s => %s", $mtimestamp, $datetime);//1523856374.820 => 2018-04-16 13:26:14.820
    }
}
if( !function_exists('current_msectime'))
{
    /**
     * [current_msectime 返出毫秒时间戳]
     * @Author   Jerry
     * @DateTime 2018-10-31T19:51:12+0800
     * @Example  eg:
     * @return   [type]                   [description]
     */
    function current_msectime(){
        list($msec, $sec) = explode(' ', microtime());
        return  (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
    }
}