                 Log.debug("loading completed");
             }
             var fragMetrics : FragmentMetrics = _frag_current.metrics;
-            fragMetrics.loading_end_time = new Date().valueOf();
+            fragMetrics.loading_end_time = getTimer();
             fragMetrics.size = fragData.bytesLoaded;
 
             var _loading_duration : uint = fragMetrics.loading_end_time - fragMetrics.loading_request_time;

            if (_hasDiscontinuity || _switchlevel) {
                _demux = null;
            }
            frag.metrics.loading_request_time = new Date().valueOf();
            _frag_current = frag;
            if (frag.decrypt_url != null) {
                if (_keymap[frag.decrypt_url] == undefined) {

            }
            if (HLSSettings.fragmentLoadMaxRetry == -1 || _frag_retry_count < HLSSettings.fragmentLoadMaxRetry) {
                _loading_state = LOADING_FRAGMENT_IO_ERROR;
                _frag_load_error_date = getTimer() + _frag_retry_timeout;
                CONFIG::LOGGING {
                    Log.warn("retry fragment load in " + _frag_retry_timeout + " ms, count=" + _frag_retry_count);
                }
