fix profiler frame time (#4884)

This commit is contained in:
jiaxin.lai
2019-07-16 15:59:57 +08:00
committed by Weiliang Wang
parent f03df0bb39
commit 1c3cd4a7d5
+1 -1
View File
@@ -231,6 +231,7 @@ function beforeUpdate () {
generateNode();
const now = cc.director._lastUpdate;
getCounter('frame').end(now);
getCounter('frame').start(now);
getCounter('logic').start(now);
}
@@ -286,7 +287,6 @@ function afterDraw () {
const now = performance.now();
getCounter('frame').end(now);
getCounter('fps').frame(now);
getCounter('draws').value = device!.numDrawCalls;
getCounter('bufferMemory').value = device!.memoryStatus.bufferSize;