4.2. 获得(从epoch时间纪元以来的)(以毫秒为单位的)当前时间:getCurTimeInMillisec

    //refer: http://bytes.com/topic/c-sharp/answers/713458-c-function-equivalent-javascript-gettime-function
    //get current time in milli-second-since-epoch(1970/01/01)
    public double getCurTimeInMillisec()
    {
        DateTime st = new DateTime(1970, 1, 1);
        TimeSpan t = (DateTime.Now - st);
        return t.TotalMilliseconds; // milli seconds since epoch
    }
    

例 4.2. getCurTimeInMillisec 的使用范例


double curMilliSecDouble = crl.getCurTimeInMillisec(); //1343392590725.6758